summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Script.h3
-rw-r--r--src/control/Script6.cpp26
-rw-r--r--src/control/Script7.cpp2
3 files changed, 16 insertions, 15 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index aafc681c..ae984c59 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -570,12 +570,11 @@ 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);
-
};
#ifdef USE_DEBUG_SCRIPT_LOADER
diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp
index 76780941..4d7121f2 100644
--- a/src/control/Script6.cpp
+++ b/src/control/Script6.cpp
@@ -42,6 +42,19 @@
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: if (mi >= MI_VICE1 && mi <= MI_VICE8 && miami) return true; break;
+ }
+ return false;
+}
+
bool CRunningScript::ThisIsAValidRandomPed(uint32 pedtype, int civ, int gang, int criminal)
{
switch (pedtype) {
@@ -66,19 +79,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);
- }
-}
-
int8 CRunningScript::ProcessCommands1000To1099(int32 command)
{
switch (command) {
diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp
index 55068bb6..34a364a7 100644
--- a/src/control/Script7.cpp
+++ b/src/control/Script7.cpp
@@ -793,6 +793,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(ScriptParams[0]);
script_assert(pVehicle);
pVehicle->bIsFrozen = ScriptParams[1];
+ pVehicle->bInfiniteMass = ScriptParams[1];
return 0;
}
case COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_CHAR:
@@ -1104,6 +1105,7 @@ int8 CRunningScript::ProcessCommands1300To1399(int32 command)
CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]);
script_assert(pObject);
pObject->bIsFrozen = ScriptParams[1];
+ pObject->bInfiniteMass = ScriptParams[1];
return 0;
}
case COMMAND_SET_PLAYER_HAS_MET_DEBBIE_HARRY: