From 9b09aa3384213dab45db023d95487096e64ad5c6 Mon Sep 17 00:00:00 2001 From: aap Date: Mon, 18 May 2020 16:40:30 +0200 Subject: [PATCH] fixes for braking and cloud rotation at high fps --- src/render/Clouds.cpp | 5 +++++ src/vehicles/Vehicle.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp index 9c0fde0f..60450213 100644 --- a/src/render/Clouds.cpp +++ b/src/render/Clouds.cpp @@ -69,8 +69,13 @@ void CClouds::Update(void) { float s = Sin(TheCamera.Orientation - 0.85f); +#ifdef FIX_BUGS + CloudRotation += CWeather::Wind*s*0.0025f*CTimer::GetTimeStepFix(); + IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep() + 0.3f*CTimer::GetTimeStepFix()) * 60.0f; +#else CloudRotation += CWeather::Wind*s*0.0025f; IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep() + 0.3f) * 60.0f; +#endif } void diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 5dc7bc72..f85f0d50 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -514,6 +514,9 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon brake = 0.2f * mod_HandlingManager.field_4 / m_fMass; else brake = mod_HandlingManager.field_4 / m_fMass; +#ifdef FIX_BUGS + brake *= CTimer::GetTimeStepFix(); +#endif } }