summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-01-16 11:32:41 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-01-16 11:35:36 +0100
commitb4f6a9336b1615c3da1708e6155ffb8503b52b89 (patch)
tree7a72e2e1c47e992d6bf465aefc975003550400f5
parentScript5.cpp (diff)
downloadre3-b4f6a9336b1615c3da1708e6155ffb8503b52b89.tar
re3-b4f6a9336b1615c3da1708e6155ffb8503b52b89.tar.gz
re3-b4f6a9336b1615c3da1708e6155ffb8503b52b89.tar.bz2
re3-b4f6a9336b1615c3da1708e6155ffb8503b52b89.tar.lz
re3-b4f6a9336b1615c3da1708e6155ffb8503b52b89.tar.xz
re3-b4f6a9336b1615c3da1708e6155ffb8503b52b89.tar.zst
re3-b4f6a9336b1615c3da1708e6155ffb8503b52b89.zip
-rw-r--r--src/control/Script.h2
-rw-r--r--src/control/Script6.cpp28
2 files changed, 15 insertions, 15 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index 709070a5..5c31625f 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -636,9 +636,9 @@ public:
float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; }
+ bool ThisIsAValidRandomCop(uint32 mi, int cop, int swat, int fbi, int army, int miami);
bool ThisIsAValidRandomPed(uint32 pedtype, int civ, int gang, int criminal);
bool CheckDamagedWeaponType(int32 actual, int32 type);
- static bool ThisIsAValidRandomCop(int32 mi, bool cop, bool swat, bool fbi, bool army, bool miami);
void ReturnFromGosubOrFunction();
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) {