summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp2
-rw-r--r--src/core/World.cpp8
-rw-r--r--src/core/World.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index a6cf71f1..5d2768de 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -3621,6 +3621,8 @@ CCamera::LoadPathSplines(int file)
m_arrPathArray[i].m_arr_PathData[j] = atof(token);
i++;
j = 0;
+ if (i == MAX_NUM_OF_SPLINETYPES)
+ reading = false;
memset(token, 0, 32);
n = 0;
}
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 62f58f7f..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;
@@ -1788,13 +1788,13 @@ CWorld::ShutDown(void)
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);
diff --git a/src/core/World.h b/src/core/World.h
index be32db20..74ee4d8a 100644
--- a/src/core/World.h
+++ b/src/core/World.h
@@ -55,7 +55,7 @@ struct CStoredCollPoly;
class CWorld
{
- static CPtrList ms_bigBuildingsList[4];
+ static CPtrList ms_bigBuildingsList[NUM_LEVELS];
static CPtrList ms_listMovingEntityPtrs;
static CSector ms_aSectors[NUMSECTORS_Y][NUMSECTORS_X];
static uint16 ms_nCurrentScanCode;