From 6aa494285dbe6c4f3a179532d7703152115ecb7e Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Fri, 25 Sep 2020 00:57:48 +1000 Subject: [PATCH] - processMovement(): Add scaling for Exhumed's keymove. Input was far too slow and didn't match the others. --- source/core/gamecontrol.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 7fb6d4f27..a9a22f32e 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -1501,10 +1501,11 @@ void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlIn int const running = !!(inputBuffer->actions & SB_RUN); int const keymove = gi->playerKeyMove() << running; int const mousevelscale = g_gameType & GAMEFLAG_BLOOD ? 32 : 4; + int const cntrlvelscale = g_gameType & GAMEFLAG_PSEXHUMED ? 8 : 1; // process mouse and initial controller input. if (buttonMap.ButtonDown(gamefunc_Strafe) && allowstrafe) - currInput->svel -= xs_CRoundToInt((hidInput->mousex * mousevelscale) + (scaleAdjust * (hidInput->dyaw * keymove))); + currInput->svel -= xs_CRoundToInt((hidInput->mousex * mousevelscale) + (scaleAdjust * hidInput->dyaw * keymove)); else currInput->q16avel += FloatToFixed(hidInput->mousex + (scaleAdjust * hidInput->dyaw)); @@ -1518,8 +1519,8 @@ void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlIn // process remaining controller input. currInput->q16horz -= FloatToFixed(scaleAdjust * hidInput->dpitch); - currInput->svel -= xs_CRoundToInt(scaleAdjust * (hidInput->dx * keymove)); - currInput->fvel -= xs_CRoundToInt(scaleAdjust * (hidInput->dz * keymove)); + currInput->svel -= xs_CRoundToInt(scaleAdjust * (hidInput->dx * keymove * cntrlvelscale)); + currInput->fvel -= xs_CRoundToInt(scaleAdjust * (hidInput->dz * keymove * cntrlvelscale)); // process keyboard turning keys. if (buttonMap.ButtonDown(gamefunc_Strafe) && allowstrafe)