Merge branch 'master' into tumble-changes

This commit is contained in:
SteelT 2021-01-10 00:56:48 -05:00
commit 4889cfe1cc
2 changed files with 7 additions and 2 deletions

View file

@ -925,9 +925,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
turnleft = PlayerInputDown(ssplayer, gc_turnleft);
joystickvector.xaxis = PlayerJoyAxis(ssplayer, AXISTURN);
joystickvector.yaxis = PlayerJoyAxis(ssplayer, AXISAIM);
G_HandleAxisDeadZone(forplayer, &joystickvector);
// For kart, I've turned the aim axis into a digital axis because we only
// use it for aiming to throw items forward/backward and the vote screen
// This mean that the turn axis will still be gradient but up/down will be 0
// until the stick is pushed far enough
joystickvector.yaxis = PlayerJoyAxis(ssplayer, AXISAIM);
if (encoremode)
{
turnright ^= turnleft; // swap these using three XORs

View file

@ -102,7 +102,6 @@ typedef enum
AXISTURN,
AXISMOVE,
AXISBRAKE,
AXISAIM,
AXISLOOK,
AXISDIGITAL, // axes below this use digital deadzone
@ -110,6 +109,7 @@ typedef enum
AXISFIRE = AXISDIGITAL,
AXISDRIFT,
AXISLOOKBACK,
AXISAIM,
} axis_input_e;
INT32 PlayerJoyAxis(UINT8 player, axis_input_e axissel);