summaryrefslogtreecommitdiffstats
path: root/src/render/WaterCannon.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-10-10 13:23:17 +0200
committereray orçunus <erayorcunus@gmail.com>2020-10-12 05:42:54 +0200
commit8a622a0e724cd00acc7e61b159462355319b39cb (patch)
treedadddb5687c56a275313360d36a2bdbcc1b9659f /src/render/WaterCannon.cpp
parentFix sniper and water creatures bug, mark some files (diff)
downloadre3-8a622a0e724cd00acc7e61b159462355319b39cb.tar
re3-8a622a0e724cd00acc7e61b159462355319b39cb.tar.gz
re3-8a622a0e724cd00acc7e61b159462355319b39cb.tar.bz2
re3-8a622a0e724cd00acc7e61b159462355319b39cb.tar.lz
re3-8a622a0e724cd00acc7e61b159462355319b39cb.tar.xz
re3-8a622a0e724cd00acc7e61b159462355319b39cb.tar.zst
re3-8a622a0e724cd00acc7e61b159462355319b39cb.zip
Diffstat (limited to '')
-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();