summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-02-22 15:53:28 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-02-22 15:53:28 +0100
commitbc139e0702ff92ae05072223ded6d6e7f0bdd8d7 (patch)
tree5ece1d6d437f438a69a92d41a90662477447aff6 /src
parentremoved extra include (diff)
downloadre3-bc139e0702ff92ae05072223ded6d6e7f0bdd8d7.tar
re3-bc139e0702ff92ae05072223ded6d6e7f0bdd8d7.tar.gz
re3-bc139e0702ff92ae05072223ded6d6e7f0bdd8d7.tar.bz2
re3-bc139e0702ff92ae05072223ded6d6e7f0bdd8d7.tar.lz
re3-bc139e0702ff92ae05072223ded6d6e7f0bdd8d7.tar.xz
re3-bc139e0702ff92ae05072223ded6d6e7f0bdd8d7.tar.zst
re3-bc139e0702ff92ae05072223ded6d6e7f0bdd8d7.zip
Diffstat (limited to 'src')
-rw-r--r--src/control/Script.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 5cd2a4d3..f6db26ec 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -8952,7 +8952,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CollectParameters(&m_nIp, 2);
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]);
assert(pVehicle);
- assert(ScriptParams[1] >= 0 && ScriptParams[1] < 8);
+ assert(ScriptParams[1] >= 0 && ScriptParams[1] < ARRAY_SIZE(pVehicle->pPassengers));
CPed* pPassenger = pVehicle->pPassengers[ScriptParams[1]];
ScriptParams[0] = CPools::GetPedPool()->GetIndex(pPassenger);
StoreParameters(&m_nIp, 1);
@@ -9380,7 +9380,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
pVehicle->pDriver->bScriptObjectiveCompleted = false;
pVehicle->pDriver->SetObjective(OBJECTIVE_LEAVE_VEHICLE, pVehicle);
}
- for (int i = 0; i < 8; i++)
+ for (int i = 0; i < ARRAY_SIZE(pVehicle->pPassengers); i++)
{
if (pVehicle->pPassengers[i]) {
pVehicle->pPassengers[i]->bScriptObjectiveCompleted = false;