From 9a57c590cd99d7ff9871849fb8ce3017570c1c2a Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 21 Jun 2014 20:17:17 +0200 Subject: 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. --- src/Generating/GridStructGen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Generating') diff --git a/src/Generating/GridStructGen.cpp b/src/Generating/GridStructGen.cpp index 2931df3eb..95f8c38bc 100644 --- a/src/Generating/GridStructGen.cpp +++ b/src/Generating/GridStructGen.cpp @@ -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 -- cgit v1.2.3