summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-16 09:09:39 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-16 09:09:39 +0200
commitd7e764d519a9b96969786a99494eba8c3af988b9 (patch)
tree811331933b6959a1071d452536c4eca7873621ac /src/vehicles
parentMerge branch 'lcs' of github.com:GTAmodding/re3 into lcs (diff)
parentPS2 audio reflections (diff)
downloadre3-d7e764d519a9b96969786a99494eba8c3af988b9.tar
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.gz
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.bz2
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.lz
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.xz
re3-d7e764d519a9b96969786a99494eba8c3af988b9.tar.zst
re3-d7e764d519a9b96969786a99494eba8c3af988b9.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index a249ee7f..810c1661 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -3600,6 +3600,7 @@ CAutomobile::ProcessBuoyancy(void)
CVector impulse, point;
if(mod_Buoyancy.ProcessBuoyancy(this, m_fBuoyancy, &point, &impulse)){
+ bTouchingWater = true;
float timeStep = Max(CTimer::GetTimeStep(), 0.01f);
float impulseRatio = impulse.z / (GRAVITY * m_fMass * timeStep);
float waterResistance = Pow(1.0f - 0.05f*impulseRatio, CTimer::GetTimeStep());
@@ -3614,7 +3615,7 @@ CAutomobile::ProcessBuoyancy(void)
heliHitWaterHard = true;
}
}else{
- float strength = 1.0f/Max(8.0f*impulseRatio, 1.0f);
+ float strength = Max(8.0f*impulseRatio, 1.0f);
ApplyMoveForce(-2.0f*impulse/strength);
ApplyTurnForce(-impulse/strength, point);
if(impulseRatio > 0.9f){