- Simplify moto velocity sign determination.

This commit is contained in:
Mitchell Richters 2023-03-19 13:37:27 +11:00
parent 9d74a5c60b
commit c13c244dca

View file

@ -592,7 +592,7 @@ static float motoApplyTurn(player_struct* p, HIDInput* const hidInput, const int
else if (p->vehTurnLeft || p->vehTurnRight || p->moto_drink)
{
constexpr float velScale = (3.f / 10.f);
const float baseVel = (buttonMap.ButtonDown(gamefunc_Move_Backward) || hidInput->joyaxes[JOYAXIS_Forward] < 0) && p->MotoSpeed <= 0 ? -VEHICLETURN : VEHICLETURN;
const float baseVel = VEHICLETURN * Sgn(p->MotoSpeed);
doVehicleTilting(p, factor);
turnvel = doVehicleTurning(p, hidInput, kbdDir, factor, baseVel, velScale);