Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Make burst tires wiggle BIKES at about the same frequency regardless …
…of framerate.
  • Loading branch information
Veyrdite committed Jul 8, 2021
1 parent 179450c commit d8e8f1cae8572dfca781857f771fd1e4a6d60421
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/vehicles/Vehicle.cpp
@@ -985,8 +985,13 @@ CVehicle::ProcessBikeWheel(CVector &wheelFwd, CVector &wheelRight, CVector &whee
#endif

if(wheelStatus == WHEEL_STATUS_BURST){
float fwdspeed = Min(contactSpeedFwd, fBurstBikeSpeedMax);
float fwdspeed = Min(contactSpeedFwd, fBurstBikeSpeedMax);
#ifdef FIX_BUGS
// Keep the effect running at the same frequency even when the game is at high FPS
right += fwdspeed * CGeneral::GetRandomNumberInRange(-fBurstBikeTyreMod, fBurstBikeTyreMod) * CTimer::GetLogicalFramesPassed();
#else
right += fwdspeed * CGeneral::GetRandomNumberInRange(-fBurstBikeTyreMod, fBurstBikeTyreMod);
#endif
}
}

0 comments on commit d8e8f1c

Please sign in to comment.