- set p->TiltStatus in motoApplyTurn() to 0 if less than factor, not previous hard-coded constant.

* Backport of same fix in d0f839060e.
This commit is contained in:
Mitchell Richters 2020-07-25 09:51:52 +10:00
parent 52cd2db4e7
commit 0d0636b0a7

View file

@ -1002,12 +1002,12 @@ static double motoApplyTurn(player_struct* p, int turnl, int turnr, int bike_tur
p->TiltStatus -= (float)factor;
else if (p->TiltStatus < 0)
p->TiltStatus += (float)factor;
if (fabs(p->TiltStatus) < 0.025)
p->TiltStatus = 0;
}
}
if (fabs(p->TiltStatus) < factor)
p->TiltStatus = 0;
return turnvel * factor;
}