summaryrefslogtreecommitdiffstats
path: root/src/core/ZoneCull.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ZoneCull.cpp')
-rw-r--r--src/core/ZoneCull.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ZoneCull.cpp b/src/core/ZoneCull.cpp
index 6dcd0f18..c376e11f 100644
--- a/src/core/ZoneCull.cpp
+++ b/src/core/ZoneCull.cpp
@@ -533,7 +533,8 @@ 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));
+ CVector tempPos(minx, miny, minz);
+ return CTheZones::GetLevelFromPosition(&pos) == CTheZones::GetLevelFromPosition(&tempPos);
}
bool
@@ -560,4 +561,4 @@ CCullZones::DoWeHaveMoreThanXOccurencesOfSet(int32 count, uint16 *set)
}
}
return false;
-} \ No newline at end of file
+}