diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-06 18:43:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-06 18:43:45 +0200 |
commit | 03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928 (patch) | |
tree | 2499d662c6b962780e1f85f69a9b0b2a825abcb6 /src/core/ColStore.cpp | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
parent | Merge remote-tracking branch 'upstream/miami' into miami (diff) | |
download | re3-03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928.tar re3-03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928.tar.gz re3-03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928.tar.bz2 re3-03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928.tar.lz re3-03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928.tar.xz re3-03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928.tar.zst re3-03cecb6f1cdfb4a3eb0465c072d9793bdd8fa928.zip |
Diffstat (limited to 'src/core/ColStore.cpp')
-rw-r--r-- | src/core/ColStore.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/ColStore.cpp b/src/core/ColStore.cpp index 0715ae6e..feaf08c7 100644 --- a/src/core/ColStore.cpp +++ b/src/core/ColStore.cpp @@ -9,6 +9,7 @@ #include "Timer.h" #include "Camera.h" #include "Frontend.h" +#include "Physical.h" #include "ColStore.h" CPool<ColDef,ColDef> *CColStore::ms_pColPool; @@ -174,7 +175,13 @@ CColStore::LoadCollision(const CVector2D &pos) CGeneral::faststrcmp(GetColName(i), "yacht") == 0){ wantThisOne = true; }else{ - // TODO: check mission cleanup list + for (int j = 0; j < MAX_CLEANUP; j++) { + CPhysical* pEntity = CTheScripts::MissionCleanup.DoesThisEntityWaitForCollision(j); + if (pEntity /* !pEntity->bDontLoadCollision && !pEntity->bIsFrozen */) { + if (GetBoundingBox(i).IsPointInside(pEntity->GetPosition(), -80.0f)) + wantThisOne = true; + } + } } if(wantThisOne) @@ -221,7 +228,7 @@ CColStore::HasCollisionLoaded(const CVector2D &pos) int i; for(i = 1; i < COLSTORESIZE; i++) - if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -110.0f) && + if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -115.0f) && !GetSlot(i)->isLoaded) return false; return true; |