From b4f6a9336b1615c3da1708e6155ffb8503b52b89 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 16 Jan 2021 13:32:41 +0300 Subject: more fix --- src/control/Script6.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/control/Script6.cpp') diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp index 1db9e207..bbb6cfcb 100644 --- a/src/control/Script6.cpp +++ b/src/control/Script6.cpp @@ -42,6 +42,20 @@ extern const char* scriptfile; #endif +bool CRunningScript::ThisIsAValidRandomCop(uint32 mi, int cop, int swat, int fbi, int army, int miami) +{ + switch (mi) + { + case MI_COP: if (cop) return true; break; + case MI_SWAT: if (swat) return true; break; + case MI_FBI: if (fbi) return true; break; + case MI_ARMY: if (army) return true; break; + default: + return miami && (mi >= MI_VICE1 && mi <= MI_VICE8); + } + return false; +} + bool CRunningScript::ThisIsAValidRandomPed(uint32 pedtype, int civ, int gang, int criminal) { switch (pedtype) { @@ -66,20 +80,6 @@ bool CRunningScript::ThisIsAValidRandomPed(uint32 pedtype, int civ, int gang, in } } -bool CRunningScript::ThisIsAValidRandomCop(int32 mi, bool cop, bool swat, bool fbi, bool army, bool miami) -{ - switch (mi) - { - case MI_COP: if (cop) return true; - case MI_SWAT: if (swat) return true; - case MI_FBI: if (fbi) return true; - case MI_ARMY: if (army) return true; - default: - return miami && (mi >= MI_VICE1 && mi <= MI_VICE8); - } - return false; -} - int8 CRunningScript::ProcessCommands1000To1099(int32 command) { switch (command) { -- cgit v1.2.3