mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Merge branch 'fix-deadzones-2' into 'master'
Nicer Handling of aim deadzone for kart See merge request KartKrew/Kart!347
This commit is contained in:
commit
1d28003be3
2 changed files with 7 additions and 2 deletions
|
|
@ -925,9 +925,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
turnleft = PlayerInputDown(ssplayer, gc_turnleft);
|
turnleft = PlayerInputDown(ssplayer, gc_turnleft);
|
||||||
|
|
||||||
joystickvector.xaxis = PlayerJoyAxis(ssplayer, AXISTURN);
|
joystickvector.xaxis = PlayerJoyAxis(ssplayer, AXISTURN);
|
||||||
joystickvector.yaxis = PlayerJoyAxis(ssplayer, AXISAIM);
|
|
||||||
G_HandleAxisDeadZone(forplayer, &joystickvector);
|
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)
|
if (encoremode)
|
||||||
{
|
{
|
||||||
turnright ^= turnleft; // swap these using three XORs
|
turnright ^= turnleft; // swap these using three XORs
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,6 @@ typedef enum
|
||||||
AXISTURN,
|
AXISTURN,
|
||||||
AXISMOVE,
|
AXISMOVE,
|
||||||
AXISBRAKE,
|
AXISBRAKE,
|
||||||
AXISAIM,
|
|
||||||
AXISLOOK,
|
AXISLOOK,
|
||||||
|
|
||||||
AXISDIGITAL, // axes below this use digital deadzone
|
AXISDIGITAL, // axes below this use digital deadzone
|
||||||
|
|
@ -110,6 +109,7 @@ typedef enum
|
||||||
AXISFIRE = AXISDIGITAL,
|
AXISFIRE = AXISDIGITAL,
|
||||||
AXISDRIFT,
|
AXISDRIFT,
|
||||||
AXISLOOKBACK,
|
AXISLOOKBACK,
|
||||||
|
AXISAIM,
|
||||||
} axis_input_e;
|
} axis_input_e;
|
||||||
|
|
||||||
INT32 PlayerJoyAxis(UINT8 player, axis_input_e axissel);
|
INT32 PlayerJoyAxis(UINT8 player, axis_input_e axissel);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue