summaryrefslogtreecommitdiffstats
path: root/src/core/ZoneCull.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/ZoneCull.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/ZoneCull.cpp b/src/core/ZoneCull.cpp
index 7a221f39..6dcd0f18 100644
--- a/src/core/ZoneCull.cpp
+++ b/src/core/ZoneCull.cpp
@@ -34,13 +34,13 @@ CCullZones::Init(void)
int i;
NumAttributeZones = 0;
- NumCullZones = 0;
CurrentWantedLevelDrop_Player = 0;
CurrentFlags_Camera = 0;
CurrentFlags_Player = 0;
+ bCurrentSubwayIsInvisible = false;
+ NumCullZones = 0;
OldCullZone = -1;
EntityIndicesUsed = 0;
- bCurrentSubwayIsInvisible = false;
for(i = 0; i < NUMBUILDINGS; i++)
aPointersToBigBuildingsForBuildings[i] = -1;
@@ -386,7 +386,6 @@ CCullZones::AddCullZone(CVector const &position,
}
-
void
CCullZone::DoStuffLeavingZone(void)
{
@@ -522,7 +521,7 @@ CCullZone::CalcDistToCullZoneSquared(float x, float y)
bool
CCullZone::IsEntityCloseEnoughToZone(CEntity *entity, bool checkLevel)
{
- CVector &pos = entity->GetPosition();
+ const CVector &pos = entity->GetPosition();
CSimpleModelInfo *minfo = (CSimpleModelInfo*)CModelInfo::GetModelInfo(entity->GetModelIndex());
float distToZone = CalcDistToCullZone(pos.x, pos.y);
@@ -534,7 +533,7 @@ CCullZone::IsEntityCloseEnoughToZone(CEntity *entity, bool checkLevel)
if (lodDist > distToZone) return true;
if (!checkLevel) return false;
- return CTheZones::GetLevelFromPosition(pos) == CTheZones::GetLevelFromPosition(CVector(minx, miny, minz));
+ return CTheZones::GetLevelFromPosition(&pos) == CTheZones::GetLevelFromPosition(&CVector(minx, miny, minz));
}
bool
@@ -561,4 +560,4 @@ CCullZones::DoWeHaveMoreThanXOccurencesOfSet(int32 count, uint16 *set)
}
}
return false;
-}
+} \ No newline at end of file