diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-08-29 18:22:25 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-08-30 11:40:30 +0200 |
commit | 3e549a7d4484340d8d71500a7e61f81f403f48cc (patch) | |
tree | 3506aaab712cf59e5a0e687090ac7ebedd866c6b /src/control | |
parent | update librw (diff) | |
download | re3-3e549a7d4484340d8d71500a7e61f81f403f48cc.tar re3-3e549a7d4484340d8d71500a7e61f81f403f48cc.tar.gz re3-3e549a7d4484340d8d71500a7e61f81f403f48cc.tar.bz2 re3-3e549a7d4484340d8d71500a7e61f81f403f48cc.tar.lz re3-3e549a7d4484340d8d71500a7e61f81f403f48cc.tar.xz re3-3e549a7d4484340d8d71500a7e61f81f403f48cc.tar.zst re3-3e549a7d4484340d8d71500a7e61f81f403f48cc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/PathFind.cpp | 2 | ||||
-rw-r--r-- | src/control/Script.cpp | 14 | ||||
-rw-r--r-- | src/control/Script.h | 2 |
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 bf761a3f..0921d1c6 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: @@ -2350,7 +2350,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); }; |