diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-14 22:31:32 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-14 22:31:32 +0200 |
commit | eadf0496bf2b365938b64f5f239d0c353ce9770e (patch) | |
tree | 88d0dfe8680eacdae274fef4078d32bac930e2c5 /src | |
parent | Switch PR & remove X11 part from CMakeLists (diff) | |
download | re3-eadf0496bf2b365938b64f5f239d0c353ce9770e.tar re3-eadf0496bf2b365938b64f5f239d0c353ce9770e.tar.gz re3-eadf0496bf2b365938b64f5f239d0c353ce9770e.tar.bz2 re3-eadf0496bf2b365938b64f5f239d0c353ce9770e.tar.lz re3-eadf0496bf2b365938b64f5f239d0c353ce9770e.tar.xz re3-eadf0496bf2b365938b64f5f239d0c353ce9770e.tar.zst re3-eadf0496bf2b365938b64f5f239d0c353ce9770e.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicles/Automobile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 5e2b0c10..387311b7 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -3690,6 +3690,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()); @@ -3704,7 +3705,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){ |