mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
Fix how analog axis values are used by the game code, part 1: movement.
Turning and looking will require me to disentangle CONTROL_GetMouseDelta from the rest of CONTROL_PollDevices. git-svn-id: https://svn.eduke32.com/eduke32@7946 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7338988b5e
commit
f1e67616a9
1 changed files with 7 additions and 3 deletions
|
@ -2926,6 +2926,9 @@ void P_GetInput(int const playerNum)
|
|||
|
||||
CONTROL_GetInput(&info);
|
||||
|
||||
#if 0
|
||||
// these don't seem to have an on switch
|
||||
|
||||
if (ud.config.MouseDeadZone)
|
||||
{
|
||||
if (info.dpitch > 0)
|
||||
|
@ -2945,6 +2948,7 @@ void P_GetInput(int const playerNum)
|
|||
info.dpitch = tabledivide32_noinline(info.dpitch, ud.config.MouseBias);
|
||||
else info.dyaw = tabledivide32_noinline(info.dyaw, ud.config.MouseBias);
|
||||
}
|
||||
#endif
|
||||
|
||||
// JBF: Run key behaviour is selectable
|
||||
int const playerRunning = (ud.runkey_mode) ? (BUTTON(gamefunc_Run) | ud.auto_run) : (ud.auto_run ^ BUTTON(gamefunc_Run));
|
||||
|
@ -2965,12 +2969,12 @@ void P_GetInput(int const playerNum)
|
|||
|
||||
if (ud.mouseflip) input.q16horz = -input.q16horz;
|
||||
|
||||
input.svel -= info.dx;
|
||||
input.fvel = -info.dz >> 6;
|
||||
|
||||
int const turnAmount = playerRunning ? (NORMALTURN << 1) : NORMALTURN;
|
||||
int const keyMove = playerRunning ? (NORMALKEYMOVE << 1) : NORMALKEYMOVE;
|
||||
|
||||
input.svel -= (info.dx * keyMove / 10000);
|
||||
input.fvel = -(info.dz * keyMove / 10000);
|
||||
|
||||
if (BUTTON(gamefunc_Strafe))
|
||||
{
|
||||
if (BUTTON(gamefunc_Turn_Left) && !(pPlayer->movement_lock&4))
|
||||
|
|
Loading…
Reference in a new issue