summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/control')
-rw-r--r--src/control/PathFind.cpp2
-rw-r--r--src/control/Script.cpp14
-rw-r--r--src/control/Script.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index 0dd9359c..f8bc2df6 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -1737,7 +1737,7 @@ CPathFind::Load(uint8 *buf, uint32 size)
void
CPathFind::DisplayPathData(void)
{
- // Not the function from mobm_carPathLinksile but my own!
+ // Not the function from mobile but my own!
int i, j, k;
// Draw 50 units around camera
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index b978d889..b313e308 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1698,11 +1698,11 @@ void CMissionCleanup::AddEntityToList(int32 id, uint8 type)
m_nCount++;
}
-static void PossiblyWakeThisEntity(CPhysical* pEntity)
+static void PossiblyWakeThisEntity(CPhysical* pEntity, bool ifColLoaded = false)
{
if (!pEntity->bIsStaticWaitingForCollision)
return;
- if (CColStore::HasCollisionLoaded(pEntity->GetPosition())) {
+ if (!ifColLoaded || CColStore::HasCollisionLoaded(pEntity->GetPosition())) {
pEntity->bIsStaticWaitingForCollision = false;
if (!pEntity->IsStatic())
pEntity->AddToMovingList();
@@ -1745,7 +1745,7 @@ void CMissionCleanup::RemoveEntityFromList(int32 id, uint8 type)
}
}
-void CMissionCleanup::CheckIfCollisionHasLoadedForMissionObject()
+void CMissionCleanup::CheckIfCollisionHasLoadedForMissionObjects()
{
for (int i = 0; i < MAX_CLEANUP; i++) {
switch (m_sEntities[i].type) {
@@ -1753,21 +1753,21 @@ void CMissionCleanup::CheckIfCollisionHasLoadedForMissionObject()
{
CVehicle* v = CPools::GetVehiclePool()->GetAt(m_sEntities[i].id);
if (v)
- PossiblyWakeThisEntity(v);
+ PossiblyWakeThisEntity(v, true);
break;
}
case CLEANUP_CHAR:
{
CPed* p = CPools::GetPedPool()->GetAt(m_sEntities[i].id);
if (p)
- PossiblyWakeThisEntity(p);
+ PossiblyWakeThisEntity(p, true);
break;
}
case CLEANUP_OBJECT:
{
CObject* o = CPools::GetObjectPool()->GetAt(m_sEntities[i].id);
if (o)
- PossiblyWakeThisEntity(o);
+ PossiblyWakeThisEntity(o, true);
break;
}
default:
@@ -2351,7 +2351,7 @@ void CTheScripts::Process()
float timeStep = CTimer::GetTimeStepInMilliseconds();
UpsideDownCars.UpdateTimers();
StuckCars.Process();
- MissionCleanup.CheckIfCollisionHasLoadedForMissionObject();
+ MissionCleanup.CheckIfCollisionHasLoadedForMissionObjects();
DrawScriptSpheres();
if (FailCurrentMission)
--FailCurrentMission;
diff --git a/src/control/Script.h b/src/control/Script.h
index ba315c46..42f9cbff 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -138,7 +138,7 @@ public:
void AddEntityToList(int32, uint8);
void RemoveEntityFromList(int32, uint8);
void Process();
- void CheckIfCollisionHasLoadedForMissionObject();
+ void CheckIfCollisionHasLoadedForMissionObjects();
CPhysical* DoesThisEntityWaitForCollision(int i);
};