summaryrefslogtreecommitdiffstats
path: root/src/control/CarAI.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2019-10-16 23:53:25 +0200
committerSergeanur <s.anureev@yandex.ua>2019-10-16 23:53:25 +0200
commit5b1ffb09124c7427b7efb421091179ddecc725c4 (patch)
treeac2d216a9aa6b79359371fe73b400c44fc5bca6e /src/control/CarAI.cpp
parentMerge pull request #244 from Nick007J/master (diff)
downloadre3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.gz
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.bz2
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.lz
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.xz
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.tar.zst
re3-5b1ffb09124c7427b7efb421091179ddecc725c4.zip
Diffstat (limited to '')
-rw-r--r--src/control/CarAI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp
index bb0c1ec3..b4dd8777 100644
--- a/src/control/CarAI.cpp
+++ b/src/control/CarAI.cpp
@@ -588,7 +588,7 @@ void CCarAI::MakeWayForCarWithSiren(CVehicle *pVehicle)
CVector2D forward = pVehicle->GetMoveSpeed() / flatSpeed;
float projection = flatSpeed * 45 + 20;
int i = CPools::GetVehiclePool()->GetSize();
- while (i--) {
+ while (--i >= 0) {
CVehicle* vehicle = CPools::GetVehiclePool()->GetSlot(i);
if (!vehicle)
continue;