mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Don't adjust analog turning because of the Run gamefunc
git-svn-id: https://svn.eduke32.com/eduke32@7997 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
addc919636
commit
6fa8a17c44
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue