summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-19 00:49:51 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-19 00:49:51 +0200
commita27fc8d9d93572e7615e5eb599cc7f596c01d7b0 (patch)
tree9717d1fb8c3667b49a189ca87e4e174eb663c180 /src
parentscript revision (diff)
parentsome less certainly fps fixes (diff)
downloadre3-a27fc8d9d93572e7615e5eb599cc7f596c01d7b0.tar
re3-a27fc8d9d93572e7615e5eb599cc7f596c01d7b0.tar.gz
re3-a27fc8d9d93572e7615e5eb599cc7f596c01d7b0.tar.bz2
re3-a27fc8d9d93572e7615e5eb599cc7f596c01d7b0.tar.lz
re3-a27fc8d9d93572e7615e5eb599cc7f596c01d7b0.tar.xz
re3-a27fc8d9d93572e7615e5eb599cc7f596c01d7b0.tar.zst
re3-a27fc8d9d93572e7615e5eb599cc7f596c01d7b0.zip
Diffstat (limited to 'src')
-rw-r--r--src/animation/AnimManager.cpp2
-rw-r--r--src/vehicles/Automobile.cpp6
-rw-r--r--src/vehicles/Vehicle.cpp10
3 files changed, 17 insertions, 1 deletions
diff --git a/src/animation/AnimManager.cpp b/src/animation/AnimManager.cpp
index e37c0f8e..16207f54 100644
--- a/src/animation/AnimManager.cpp
+++ b/src/animation/AnimManager.cpp
@@ -926,7 +926,7 @@ const AnimAssocDefinition CAnimManager::ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_
{ "grenade", "grenade", MI_COP, awc(aThrowAnimations), aWeaponAnimDescs },
{ "flame", "flame", MI_COP, awc(aFlamethrowerAnimations), aWeaponAnimDescs },
{ "medic", "medic", MI_COP, awc(aMedicAnimations), aMedicAnimDescs },
- { "sunbathe", "sunbathe", MI_COP, awc(aSunbatheAnimations), aSunbatheAnimDescs },
+ { "sunbathe", "sunbathe", MI_COP, 1, aSunbatheAnimations, aSunbatheAnimDescs }, // NB: not using awc here!
{ "playidles", "playidles", MI_COP, awc(aPlayerIdleAnimations), aPlayerIdleAnimDescs },
{ "riot", "riot", MI_COP, awc(aRiotAnimations), aRiotAnimDescs },
{ "strip", "strip", MI_COP, awc(aStripAnimations), aStripAnimDescs },
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 fe798514..c5699d5e 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){