From 6fa8a17c44c791ba9f2870ae991cddb143e9a8f1 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 14 Aug 2019 06:55:21 +0000 Subject: [PATCH] Don't adjust analog turning because of the Run gamefunc git-svn-id: https://svn.eduke32.com/eduke32@7997 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 20380a275..07c244738 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -2945,6 +2945,7 @@ void P_GetInput(int const playerNum) // JBF: Run key behaviour is selectable int const playerRunning = (ud.runkey_mode) ? (BUTTON(gamefunc_Run) | ud.auto_run) : (ud.auto_run ^ BUTTON(gamefunc_Run)); int const turnAmount = playerRunning ? (NORMALTURN << 1) : NORMALTURN; + constexpr int const analogTurnAmount = (NORMALTURN << 1); int const keyMove = playerRunning ? (NORMALKEYMOVE << 1) : NORMALKEYMOVE; constexpr int const analogExtent = 32767; // KEEPINSYNC sdlayer.cpp @@ -2962,7 +2963,7 @@ void P_GetInput(int const playerNum) else { input.q16avel = fix16_div(fix16_from_int(info.mousex), F16(32)); - input.q16avel += fix16_from_int(info.dyaw) / analogExtent * (turnAmount << 1); + input.q16avel += fix16_from_int(info.dyaw) / analogExtent * (analogTurnAmount << 1); } if (g_myAimMode) @@ -2972,7 +2973,7 @@ void P_GetInput(int const playerNum) if (ud.mouseflip) input.q16horz = -input.q16horz; - input.q16horz -= fix16_from_int(info.dpitch) / analogExtent * turnAmount; + input.q16horz -= fix16_from_int(info.dpitch) / analogExtent * analogTurnAmount; input.svel -= info.dx * keyMove / analogExtent; input.fvel -= info.dz * keyMove / analogExtent;