From c8a74a8f3fa65156863f79804110fa5279e3f6ba Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 25 Sep 2020 07:44:46 -0400 Subject: [PATCH] - sw: flykey: guard against non-godmode, bind to j by default --- source/sw/src/player.cpp | 7 ++++++- wadsrc/static/filter/shadowwarrior/engine/defbinds.txt | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 147139670..32d125cb1 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -3715,8 +3715,13 @@ bool PlayerFlyKey(void) { if (!ToggleFlyMode) return false; + ToggleFlyMode = false; - return true; + + if (!GodMode) + return false; + + return true; } void diff --git a/wadsrc/static/filter/shadowwarrior/engine/defbinds.txt b/wadsrc/static/filter/shadowwarrior/engine/defbinds.txt index 78f8097d5..aae668760 100644 --- a/wadsrc/static/filter/shadowwarrior/engine/defbinds.txt +++ b/wadsrc/static/filter/shadowwarrior/engine/defbinds.txt @@ -7,3 +7,4 @@ N "useitem 4" G "useitem 5" F "useitem 6" C "useitem 7" +J "fly"