1
0

Fixed a caching bug in GridStructGen.

The elements in cache were queried wrong, so sometimes they wouldn't be used even if they were the ones to use.
This commit is contained in:
madmaxoft 2014-06-21 20:17:17 +02:00
parent 0e8c4ca5ab
commit 9a57c590cd

View File

@ -88,8 +88,8 @@ void cGridStructGen::GetStructuresForChunk(int a_ChunkX, int a_ChunkZ, cStructur
for (cStructurePtrs::iterator itr = m_Cache.begin(), end = m_Cache.end(); itr != end;)
{
if (
((*itr)->m_OriginX >= MinX) && ((*itr)->m_OriginX < MaxX) &&
((*itr)->m_OriginZ >= MinZ) && ((*itr)->m_OriginZ < MaxZ)
((*itr)->m_GridX >= MinX) && ((*itr)->m_GridX < MaxX) &&
((*itr)->m_GridZ >= MinZ) && ((*itr)->m_GridZ < MaxZ)
)
{
// want