summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-10-18 15:39:27 +0300
committerNikolay Korolev <nickvnuk@gmail.com>2020-10-18 15:39:27 +0300
commit8d92a0681ac6a55ccec3927eb29c3ccf665d62a9 (patch)
tree20fbd2ce24fd9e479718ecc1f739c43dcb5fb494
parentc856d88691be1f40b454ac499305503d51c2d792 (diff)
fix in ped attractor
-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))