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:
parent
0e8c4ca5ab
commit
9a57c590cd
@ -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;)
|
for (cStructurePtrs::iterator itr = m_Cache.begin(), end = m_Cache.end(); itr != end;)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
((*itr)->m_OriginX >= MinX) && ((*itr)->m_OriginX < MaxX) &&
|
((*itr)->m_GridX >= MinX) && ((*itr)->m_GridX < MaxX) &&
|
||||||
((*itr)->m_OriginZ >= MinZ) && ((*itr)->m_OriginZ < MaxZ)
|
((*itr)->m_GridZ >= MinZ) && ((*itr)->m_GridZ < MaxZ)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// want
|
// want
|
||||||
|
Loading…
Reference in New Issue
Block a user