summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-12 23:37:25 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-12 23:37:25 +0100
commit4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7 (patch)
tree44bb6b52bfe5ab03b274e1a11ec9ec1aaec19556 /src
parentfix CreateInstance virtual overload order (diff)
downloadre3-4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7.tar
re3-4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7.tar.gz
re3-4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7.tar.bz2
re3-4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7.tar.lz
re3-4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7.tar.xz
re3-4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7.tar.zst
re3-4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7.zip
Diffstat (limited to 'src')
-rw-r--r--src/control/Script4.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp
index efe35efb..fa9a9d6a 100644
--- a/src/control/Script4.cpp
+++ b/src/control/Script4.cpp
@@ -1811,8 +1811,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
return 0;
int attempts;
int model = -1;
- int index = CGeneral::GetRandomNumberInRange(0, 50);
- for (attempts = 0; attempts < 50; attempts++) {
+ int index = CGeneral::GetRandomNumberInRange(0, MAXVEHICLESLOADED);
+ for (attempts = 0; attempts < MAXVEHICLESLOADED; attempts++) {
if (model != -1)
break;
model = CStreaming::ms_vehiclesLoaded[index];