From 4505b8795add8bdc9ee30aa9eb6ced6f8310ddc7 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Wed, 13 Jan 2021 01:37:25 +0300 Subject: [PATCH] fix --- src/control/Script4.cpp | 4 ++-- 1 file 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];