Fix weak bike brakes at high FPS (possibly caused by ba832f93e8 )

This commit is contained in:
Veyrdite 2021-07-24 10:13:52 +10:00
parent ba832f93e8
commit 763337c255
1 changed files with 5 additions and 0 deletions

View File

@ -722,7 +722,12 @@ CBike::ProcessControl(void)
acceleration = pHandling->Transmission.CalculateDriveAcceleration(m_fGasPedal, m_nCurrentGear, m_fChangeGearTime, fwdSpeed, gripCheat);
acceleration /= m_fForceMultiplier;
#ifdef FIX_BUGS
// Keep timestep out of this, it gets added properly inside ProcessWheel() later. Fixes weak brakes at high FPS.
brake = m_fBrakePedal * pHandling->fBrakeDeceleration * CTimer::GetDefaultTimeStep();
#else
brake = m_fBrakePedal * pHandling->fBrakeDeceleration * CTimer::GetTimeStep();
#endif
bool neutralHandling = GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && (pHandling->Flags & HANDLING_NEUTRALHANDLING);
float brakeBiasFront = neutralHandling ? 1.0f : 2.0f*pHandling->fBrakeBias;
float brakeBiasRear = neutralHandling ? 1.0f : 2.0f*(1.0f-pHandling->fBrakeBias);