- Duke/RR: Ensure p->vehForwardScale/p->vehReverseScale can only be a maximum of 1. Controller input with high sensitivity could effectively turbo-charge the bike ;)

This commit is contained in:
Mitchell Richters 2020-11-06 16:04:33 +11:00
parent 466bc84697
commit 74dfbfe6f8

View file

@ -775,8 +775,8 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I
if (p->OnBoat || !p->moto_underwater)
{
p->vehForwardScale = (buttonMap.ButtonDown(gamefunc_Move_Forward) || buttonMap.ButtonDown(gamefunc_Strafe)) + hidInput->dz;
p->vehReverseScale = buttonMap.ButtonDown(gamefunc_Move_Backward) + -hidInput->dz;
p->vehForwardScale = std::min((buttonMap.ButtonDown(gamefunc_Move_Forward) || buttonMap.ButtonDown(gamefunc_Strafe)) + hidInput->dz, 1.f);
p->vehReverseScale = std::min(buttonMap.ButtonDown(gamefunc_Move_Backward) + -hidInput->dz, 1.f);
if (loc.actions & SB_RUN)
loc.actions |= SB_CROUCH;