From 1a0b363ded02d0017b199ab64d34ba4dad7f87d5 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 26 Nov 2019 08:25:00 +0000 Subject: [PATCH] SW: Allow the Run key to Walk when AutoRun is enabled git-svn-id: https://svn.eduke32.com/eduke32@8309 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/sw/src/game.cpp # source/sw/src/player.cpp --- source/sw/src/game.cpp | 2 +- source/sw/src/player.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 01e47553b..a017305d8 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -4064,7 +4064,7 @@ void getinput(SW_PACKET *loc) SET_LOC_KEY(loc->bits, SK_SPACE_BAR, ((!!inputState.GetKeyStatus(KEYSC_SPACE)) | buttonMap.ButtonDown(gamefunc_Open))); - int const running = BUTTON(gamefunc_Run) || TEST(pp->Flags, PF_LOCK_RUN); // G_CheckAutorun(buttonMap.ButtonDown(gamefunc_Run)); + int const running = G_CheckAutorun(buttonMap.ButtonDown(gamefunc_Run)); int32_t turnamount; int32_t keymove; constexpr int const analogExtent = 32767; // KEEPINSYNC sdlayer.cpp diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 1e037f54b..80723dc15 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -2404,7 +2404,6 @@ MoveScrollMode2D(PLAYERp pp) #define MAXANGVEL 100 ControlInfo scrl_input; - int32_t running; int32_t keymove; int32_t momx, momy; static int mfvel=0, mfsvel=0; @@ -2435,19 +2434,19 @@ MoveScrollMode2D(PLAYERp pp) Follow_posy = pp->posy; } - running = G_CheckAutorun(buttonMap.ButtonDown(gamefunc_Run)); - if (buttonMap.ButtonDown(gamefunc_Strafe)) mfsvel -= scrl_input.dyaw>>2; mfsvel -= scrl_input.dx>>2; mfvel = -scrl_input.dz>>2; +#if 0 + int const running = !!BUTTON(gamefunc_Run) ^ !!TEST(pp->Flags, PF_LOCK_RUN); if (running) { - //keymove = NORMALKEYMOVE << 1; - keymove = NORMALKEYMOVE; + keymove = NORMALKEYMOVE << 1; } else +#endif { keymove = NORMALKEYMOVE; }