summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-18 16:55:38 +0200
committeraap <aap@papnet.eu>2020-05-18 22:52:35 +0200
commitabd230dcddd7e878f8a6b69193eb0cb74959c7b9 (patch)
tree4faf5f0e060c87009a6a4a7f9cc20046ec134bc9 /src
parentonly one sunbathe anim group (diff)
downloadre3-abd230dcddd7e878f8a6b69193eb0cb74959c7b9.tar
re3-abd230dcddd7e878f8a6b69193eb0cb74959c7b9.tar.gz
re3-abd230dcddd7e878f8a6b69193eb0cb74959c7b9.tar.bz2
re3-abd230dcddd7e878f8a6b69193eb0cb74959c7b9.tar.lz
re3-abd230dcddd7e878f8a6b69193eb0cb74959c7b9.tar.xz
re3-abd230dcddd7e878f8a6b69193eb0cb74959c7b9.tar.zst
re3-abd230dcddd7e878f8a6b69193eb0cb74959c7b9.zip
Diffstat (limited to 'src')
-rw-r--r--src/vehicles/Automobile.cpp6
-rw-r--r--src/vehicles/Vehicle.cpp10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index aad31bbf..e0ee0296 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -865,8 +865,14 @@ CAutomobile::ProcessControl(void)
CVector wheelFwd = GetForward();
CVector wheelRight = GetRight();
+#ifdef FIX_BUGS
+ // Not sure if this is needed, but brake usually has timestep as a factor
+ if(bIsHandbrakeOn)
+ brake = 20000.0f * CTimer::GetTimeStepFix();
+#else
if(bIsHandbrakeOn)
brake = 20000.0f;
+#endif
if(m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f){
if(mod_HandlingManager.HasFrontWheelDrive(pHandling->nIdentifier))
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 2b0132b2..4b36b3d3 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -494,6 +494,11 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
if(contactSpeedRight != 0.0f){
// exert opposing force
right = -contactSpeedRight/wheelsOnGround;
+#ifdef FIX_BUGS
+ // contactSpeedRight is independent of framerate but right has timestep as a factor
+ // so we probably have to fix this
+ right *= CTimer::GetTimeStepFix();
+#endif
if(wheelStatus == WHEEL_STATUS_BURST){
float fwdspeed = Min(contactSpeedFwd, 0.3f);
@@ -514,6 +519,11 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
}
}else if(contactSpeedFwd != 0.0f){
fwd = -contactSpeedFwd/wheelsOnGround;
+#ifdef FIX_BUGS
+ // contactSpeedFwd is independent of framerate but fwd has timestep as a factor
+ // so we probably have to fix this
+ fwd *= CTimer::GetTimeStepFix();
+#endif
if(!bBraking){
if(m_fGasPedal < 0.01f){