Remove extra deadzone adjustment at 0
This commit is contained in:
parent
d38b88fbb9
commit
440ccb67a6
1 changed files with 2 additions and 15 deletions
17
src/g_game.c
17
src/g_game.c
|
|
@ -1451,17 +1451,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
return;
|
||||
}
|
||||
|
||||
fixed_t deadZoneY = cv_deadzoney[forplayer].value;
|
||||
const double deadZoneYDecimal = (double) deadZoneY / FRACUNIT;
|
||||
joystickvector.xaxis = G_PlayerInputAnalog(forplayer, gc_turnright, false, DEADZONE_X) - G_PlayerInputAnalog(forplayer, gc_turnleft, false, DEADZONE_X);
|
||||
if (deadZoneYDecimal <= 0)
|
||||
{
|
||||
joystickvector.yaxis = G_PlayerInputAnalog(forplayer, gc_aimbackward, false, DEADZONE_Y) - G_PlayerInputAnalog(forplayer, gc_aimforward, false, DEADZONE_Y);
|
||||
}
|
||||
else
|
||||
{
|
||||
joystickvector.yaxis = 0;
|
||||
}
|
||||
joystickvector.yaxis = 0;
|
||||
G_HandleAxisDeadZone(forplayer, &joystickvector);
|
||||
|
||||
// For kart, I've turned the aim axis into a digital axis because we only
|
||||
|
|
@ -1469,11 +1460,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
// This mean that the turn axis will still be gradient but up/down will be 0
|
||||
// until the stick is pushed far enough
|
||||
//
|
||||
// When the deadzone is set to 0 or lower, the aim axis returns to analog to avoid breaking the chasecam and freecam controls
|
||||
if (deadZoneYDecimal > 0)
|
||||
{
|
||||
joystickvector.yaxis = G_PlayerInputAnalog(forplayer, gc_aimbackward, false, DEADZONE_Y) - G_PlayerInputAnalog(forplayer, gc_aimforward, false, DEADZONE_Y);
|
||||
}
|
||||
joystickvector.yaxis = G_PlayerInputAnalog(forplayer, gc_aimbackward, false, DEADZONE_Y) - G_PlayerInputAnalog(forplayer, gc_aimforward, false, DEADZONE_Y);
|
||||
|
||||
if (encoremode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue