summaryrefslogtreecommitdiffstats
path: root/src/render/WaterCannon.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-10-12 10:13:46 +0200
committerGitHub <noreply@github.com>2020-10-12 10:13:46 +0200
commit9e0b23f06517e6ead7ae63dcf899e58387474cb3 (patch)
treee77c7603491b84f7ecc9411f412343484c873036 /src/render/WaterCannon.cpp
parentMerge pull request #759 from Sergeanur/VC/ZoneSaveLoad (diff)
parentHud, Fire, OnscreenBlaBla (diff)
downloadre3-9e0b23f06517e6ead7ae63dcf899e58387474cb3.tar
re3-9e0b23f06517e6ead7ae63dcf899e58387474cb3.tar.gz
re3-9e0b23f06517e6ead7ae63dcf899e58387474cb3.tar.bz2
re3-9e0b23f06517e6ead7ae63dcf899e58387474cb3.tar.lz
re3-9e0b23f06517e6ead7ae63dcf899e58387474cb3.tar.xz
re3-9e0b23f06517e6ead7ae63dcf899e58387474cb3.tar.zst
re3-9e0b23f06517e6ead7ae63dcf899e58387474cb3.zip
Diffstat (limited to 'src/render/WaterCannon.cpp')
-rw-r--r--src/render/WaterCannon.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/render/WaterCannon.cpp b/src/render/WaterCannon.cpp
index 2b34db37..bd2b9a68 100644
--- a/src/render/WaterCannon.cpp
+++ b/src/render/WaterCannon.cpp
@@ -77,9 +77,13 @@ void CWaterCannon::Update_OncePerFrame(int16 index)
}
}
- int32 extinguishingPoint = CGeneral::GetRandomNumber() & (NUM_SEGMENTPOINTS - 1);
- if ( m_abUsed[extinguishingPoint] )
- gFireManager.ExtinguishPoint(m_avecPos[extinguishingPoint], 3.0f);
+ for ( int32 i = 0; i < NUM_SEGMENTPOINTS; i++ )
+ {
+ if ( m_abUsed[i] && gFireManager.ExtinguishPointWithWater(m_avecPos[i], 4.0f) )
+ {
+ break;
+ }
+ }
if ( ((index + CTimer::GetFrameCounter()) & 3) == 0 )
PushPeds();