From 81ebfeffaacfade20cb941ae8d1456ddece5cf09 Mon Sep 17 00:00:00 2001 From: ceski <56656010+ceski-1@users.noreply.github.com> Date: Tue, 20 Feb 2024 23:42:50 -0800 Subject: [PATCH] Don't use two-stage gamepad turn speed (#1524) --- src/g_game.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 7e3d2625..8200ae9d 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -427,14 +427,14 @@ static int CalcControllerSideStrafe(int speed) return BETWEEN(-sidemove[speed], sidemove[speed], side); } -static double CalcControllerAngle(int speed) +static double CalcControllerAngle(void) { - return (angleturn[speed] * axes[AXIS_TURN] * direction[joy_invert_turn]); + return (angleturn[1] * axes[AXIS_TURN] * direction[joy_invert_turn]); } -static double CalcControllerPitch(int speed) +static double CalcControllerPitch(void) { - const double pitch = angleturn[speed] * axes[AXIS_LOOK]; + const double pitch = angleturn[1] * axes[AXIS_LOOK]; return (pitch * FRACUNIT * direction[joy_invert_look]); } @@ -531,14 +531,12 @@ void G_PrepTiccmd(void) if (I_UseController()) { - const int speed = autorun ^ M_InputGameActive(input_speed); - I_CalcControllerAxes(); D_UpdateDeltaTics(); if (axes[AXIS_TURN] && !strafe) { - localview.rawangle -= CalcControllerAngle(speed) * deltatics; + localview.rawangle -= CalcControllerAngle() * deltatics; cmd->angleturn = CarryAngle(localview.rawangle); localview.angle = cmd->angleturn << 16; axes[AXIS_TURN] = 0.0f; @@ -546,7 +544,7 @@ void G_PrepTiccmd(void) if (axes[AXIS_LOOK] && padlook) { - localview.rawpitch -= CalcControllerPitch(speed) * deltatics; + localview.rawpitch -= CalcControllerPitch() * deltatics; cmd->pitch = CarryPitch(localview.rawpitch); localview.pitch = cmd->pitch; axes[AXIS_LOOK] = 0.0f;