diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-07 14:33:42 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-07 16:30:35 +0100 |
commit | db1bdfd62d5d0eb663f9844845de98fdbc0acd02 (patch) | |
tree | f85aacb6839356d9720b8dd27666e1033146780c /src/collision/ColStore.cpp | |
parent | Fix 16KHz track (diff) | |
download | re3-db1bdfd62d5d0eb663f9844845de98fdbc0acd02.tar re3-db1bdfd62d5d0eb663f9844845de98fdbc0acd02.tar.gz re3-db1bdfd62d5d0eb663f9844845de98fdbc0acd02.tar.bz2 re3-db1bdfd62d5d0eb663f9844845de98fdbc0acd02.tar.lz re3-db1bdfd62d5d0eb663f9844845de98fdbc0acd02.tar.xz re3-db1bdfd62d5d0eb663f9844845de98fdbc0acd02.tar.zst re3-db1bdfd62d5d0eb663f9844845de98fdbc0acd02.zip |
Diffstat (limited to 'src/collision/ColStore.cpp')
-rw-r--r-- | src/collision/ColStore.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/collision/ColStore.cpp b/src/collision/ColStore.cpp index 4317655a..f1e695fe 100644 --- a/src/collision/ColStore.cpp +++ b/src/collision/ColStore.cpp @@ -12,6 +12,7 @@ #include "Physical.h" #include "ColStore.h" #include "VarConsole.h" +#include "Pools.h" CPool<ColDef,ColDef> *CColStore::ms_pColPool; #ifndef MASTER @@ -184,7 +185,18 @@ CColStore::LoadCollision(const CVector2D &pos) wantThisOne = true; }else{ for (int j = 0; j < MAX_CLEANUP; j++) { - CPhysical* pEntity = CTheScripts::MissionCleanup.DoesThisEntityWaitForCollision(j); + CPhysical* pEntity = nil; + cleanup_entity_struct* pCleanup = &CTheScripts::MissionCleanUp.m_sEntities[i]; + if (pCleanup->type == CLEANUP_CAR) { + pEntity = CPools::GetVehiclePool()->GetAt(pCleanup->id); + if (!pEntity || pEntity->GetStatus() == STATUS_WRECKED) + continue; + } + else if (pCleanup->type == CLEANUP_CHAR) { + pEntity = CPools::GetPedPool()->GetAt(pCleanup->id); + if (!pEntity || ((CPed*)pEntity)->DyingOrDead()) + continue; + } if (pEntity && !pEntity->bDontLoadCollision && !pEntity->bIsFrozen) { if (GetBoundingBox(i).IsPointInside(pEntity->GetPosition(), -80.0f)) wantThisOne = true; |