summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-10-18 14:39:27 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-10-18 14:39:27 +0200
commit8d92a0681ac6a55ccec3927eb29c3ccf665d62a9 (patch)
tree20fbd2ce24fd9e479718ecc1f739c43dcb5fb494
parentobject field renamed (diff)
downloadre3-8d92a0681ac6a55ccec3927eb29c3ccf665d62a9.tar
re3-8d92a0681ac6a55ccec3927eb29c3ccf665d62a9.tar.gz
re3-8d92a0681ac6a55ccec3927eb29c3ccf665d62a9.tar.bz2
re3-8d92a0681ac6a55ccec3927eb29c3ccf665d62a9.tar.lz
re3-8d92a0681ac6a55ccec3927eb29c3ccf665d62a9.tar.xz
re3-8d92a0681ac6a55ccec3927eb29c3ccf665d62a9.tar.zst
re3-8d92a0681ac6a55ccec3927eb29c3ccf665d62a9.zip
-rw-r--r--src/peds/PedAttractor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/peds/PedAttractor.cpp b/src/peds/PedAttractor.cpp
index 9f77f2a4..cebe31b0 100644
--- a/src/peds/PedAttractor.cpp
+++ b/src/peds/PedAttractor.cpp
@@ -135,8 +135,10 @@ void CPedAttractorManager::RemoveIceCreamVanEffects(C2dEffect* pEffect)
if (vVehicleToEffect.empty())
return;
for (std::vector<CVehicleToEffect>::const_iterator assoc = vVehicleToEffect.cbegin(); assoc != vVehicleToEffect.cend();) {
- if (assoc->GetVehicle() != pVehicle)
- return;
+ if (assoc->GetVehicle() != pVehicle) {
+ assoc++;
+ continue;
+ }
uint32 total = 0;
for (uint32 j = 0; j < NUM_ATTRACTORS_FOR_ICECREAM_VAN; j++) {
if (FindAssociatedAttractor(assoc->GetEffect(j), vIceCreamAttractors))