summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 750ed026..bd64db43 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -171,6 +171,17 @@ void CMissionCleanup::AddEntityToList(int32 id, uint8 type)
m_nCount++;
}
+static void PossiblyWakeThisEntity(CPhysical* pEntity)
+{
+ if (!pEntity->bIsStaticWaitingForCollision)
+ return;
+ if (CColStore::HasCollisionLoaded(pEntity->GetPosition())) {
+ pEntity->bIsStaticWaitingForCollision = false;
+ if (!pEntity->IsStatic())
+ pEntity->AddToMovingList();
+ }
+}
+
void CMissionCleanup::RemoveEntityFromList(int32 id, uint8 type)
{
for (int i = 0; i < MAX_CLEANUP; i++){
@@ -207,17 +218,6 @@ void CMissionCleanup::RemoveEntityFromList(int32 id, uint8 type)
}
}
-static void PossiblyWakeThisEntity(CPhysical* pEntity)
-{
- if (!pEntity->m_bIsStaticWaitingForCollision)
- return;
- if (CColStore::HasCollisionLoaded(pEntity->GetPosition())) {
- pEntity->m_bIsStaticWaitingForCollision = false;
- if (!pEntity->IsStatic())
- pEntity->AddToMovingList();
- }
-}
-
void CMissionCleanup::CheckIfCollisionHasLoadedForMissionObject()
{
for (int i = 0; i < MAX_CLEANUP; i++) {
@@ -1798,7 +1798,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
ped->SetOrientation(0.0f, 0.0f, 0.0f);
CTheScripts::ClearSpaceForMissionEntity(pos, ped);
if (m_bIsMissionScript)
- ped->m_bIsStaticWaitingForCollision = true;
+ ped->bIsStaticWaitingForCollision = true;
CWorld::Add(ped);
ped->m_nZoneLevel = CTheZones::GetLevelFromPosition(pos);
CPopulation::ms_nTotalMissionPeds++;
@@ -2018,7 +2018,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
boat->AutoPilot.m_nTempAction = TEMPACT_NONE; /* Animation ID? */
boat->AutoPilot.m_nCruiseSpeed = boat->AutoPilot.m_fMaxTrafficSpeed = 20.0f;
if (m_bIsMissionScript)
- boat->m_bIsStaticWaitingForCollision = true;
+ boat->bIsStaticWaitingForCollision = true;
CWorld::Add(boat);
handle = CPools::GetVehiclePool()->GetIndex(boat);
}
@@ -2044,7 +2044,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
car->m_nZoneLevel = CTheZones::GetLevelFromPosition(pos);
car->bHasBeenOwnedByPlayer = true;
if (m_bIsMissionScript)
- car->m_bIsStaticWaitingForCollision = true;
+ car->bIsStaticWaitingForCollision = true;
CWorld::Add(car);
handle = CPools::GetVehiclePool()->GetIndex(car);
}
@@ -7422,7 +7422,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
ped->SetOrientation(0.0f, 0.0f, 0.0f);
CTheScripts::ClearSpaceForMissionEntity(pos, ped);
if (m_bIsMissionScript)
- ped->m_bIsStaticWaitingForCollision = true;
+ ped->bIsStaticWaitingForCollision = true;
CWorld::Add(ped);
ped->m_nZoneLevel = CTheZones::GetLevelFromPosition(pos);
CPopulation::ms_nTotalMissionPeds++;