summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Automobile.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-20 12:40:59 +0200
committerGitHub <noreply@github.com>2020-05-20 12:40:59 +0200
commit98b158c783e7e010b19aee22e452f1233a8f1ec2 (patch)
tree675e1d491bd8f9cb80c707fbba45ae41005a4d31 /src/vehicles/Automobile.cpp
parentMerge pull request #567 from erorcun/miami (diff)
parentsync with upstream (diff)
downloadre3-98b158c783e7e010b19aee22e452f1233a8f1ec2.tar
re3-98b158c783e7e010b19aee22e452f1233a8f1ec2.tar.gz
re3-98b158c783e7e010b19aee22e452f1233a8f1ec2.tar.bz2
re3-98b158c783e7e010b19aee22e452f1233a8f1ec2.tar.lz
re3-98b158c783e7e010b19aee22e452f1233a8f1ec2.tar.xz
re3-98b158c783e7e010b19aee22e452f1233a8f1ec2.tar.zst
re3-98b158c783e7e010b19aee22e452f1233a8f1ec2.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Automobile.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index e0ee0296..524067ca 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -2853,6 +2853,7 @@ CAutomobile::ProcessBuoyancy(void)
if(impulseRatio > 0.5f){
bIsInWater = true;
+ bIsDrowning = true;
if(m_vecMoveSpeed.z < -0.1f)
m_vecMoveSpeed.z = -0.1f;
@@ -2867,8 +2868,11 @@ CAutomobile::ProcessBuoyancy(void)
if(pPassengers[i]->IsPlayer() || !bWaterTight)
pPassengers[i]->InflictDamage(nil, WEAPONTYPE_DROWNING, CTimer::GetTimeStep(), PEDPIECE_TORSO, 0);
}
- }else
+ }
+ else {
bIsInWater = false;
+ bIsDrowning = false;
+ }
static uint32 nGenerateRaindrops = 0;
static uint32 nGenerateWaterCircles = 0;
@@ -2950,6 +2954,7 @@ CAutomobile::ProcessBuoyancy(void)
}
}else{
bIsInWater = false;
+ bIsDrowning = false;
bTouchingWater = false;
static RwRGBA splashCol = {155, 155, 185, 196};