diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-12-08 06:52:03 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-12-08 06:52:03 +0100 |
commit | f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba (patch) | |
tree | 5f59716adfd44cb5e8e7f03d5503d8d8e01b015d /src/core/World.cpp | |
parent | Fix bike's fInAirXRes (diff) | |
download | re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.gz re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.bz2 re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.lz re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.xz re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.zst re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.zip |
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r-- | src/core/World.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp index 7581a8b0..dc04738a 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -35,7 +35,7 @@ CColPoint gaTempSphereColPoints[MAX_COLLISION_POINTS]; -CPtrList CWorld::ms_bigBuildingsList[4]; +CPtrList CWorld::ms_bigBuildingsList[NUM_LEVELS]; CPtrList CWorld::ms_listMovingEntityPtrs; CSector CWorld::ms_aSectors[NUMSECTORS_Y][NUMSECTORS_X]; uint16 CWorld::ms_nCurrentScanCode; @@ -1781,21 +1781,29 @@ CWorld::ShutDown(void) CWorld::Remove(pEntity); delete pEntity; } +#ifndef FIX_BUGS pSector->m_lists[ENTITYLIST_BUILDINGS].Flush(); pSector->m_lists[ENTITYLIST_BUILDINGS_OVERLAP].Flush(); pSector->m_lists[ENTITYLIST_DUMMIES].Flush(); pSector->m_lists[ENTITYLIST_DUMMIES_OVERLAP].Flush(); +#endif } - for(int32 i = 0; i < 4; i++) { - for(CPtrNode *pNode = GetBigBuildingList((eLevelName)i).first; pNode; pNode = pNode->next) { + for(int32 i = 0; i < NUM_LEVELS; i++) { + for(CPtrNode *pNode = ms_bigBuildingsList[i].first; pNode; pNode = pNode->next) { CEntity *pEntity = (CEntity *)pNode->item; // Maybe remove from world here? delete pEntity; } - GetBigBuildingList((eLevelName)i).Flush(); + ms_bigBuildingsList[i].Flush(); } for(int i = 0; i < NUMSECTORS_X * NUMSECTORS_Y; i++) { CSector *pSector = GetSector(i % NUMSECTORS_X, i / NUMSECTORS_Y); +#ifdef FIX_BUGS + pSector->m_lists[ENTITYLIST_BUILDINGS].Flush(); + pSector->m_lists[ENTITYLIST_BUILDINGS_OVERLAP].Flush(); + pSector->m_lists[ENTITYLIST_DUMMIES].Flush(); + pSector->m_lists[ENTITYLIST_DUMMIES_OVERLAP].Flush(); +#endif if(pSector->m_lists[ENTITYLIST_BUILDINGS].first) { sprintf(gString, "Building list %d,%d not empty\n", i % NUMSECTORS_X, i / NUMSECTORS_Y); pSector->m_lists[ENTITYLIST_BUILDINGS].Flush(); |