summaryrefslogtreecommitdiffstats
path: root/source/Chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Chunk.cpp')
-rw-r--r--source/Chunk.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp
index 1c937c894..6e83d32ea 100644
--- a/source/Chunk.cpp
+++ b/source/Chunk.cpp
@@ -682,17 +682,17 @@ void cChunk::ProcessQueuedSetBlocks(void)
Int64 CurrTick = m_World->GetWorldAge();
for (sSetBlockQueueVector::iterator itr = m_SetBlockQueue.begin(); itr != m_SetBlockQueue.end();)
{
- if (itr->m_Tick < CurrTick)
+ if (itr->m_Tick <= CurrTick)
{
- // Not yet
- ++itr;
- continue;
+ // Current world age is bigger than/equal to target world age - delay time reached
+ SetBlock(itr->m_RelX, itr->m_RelY, itr->m_RelZ, itr->m_BlockType, itr->m_BlockMeta);
+ itr = m_SetBlockQueue.erase(itr);
}
else
{
- // Now is the time to set the block
- SetBlock(itr->m_RelX, itr->m_RelY, itr->m_RelZ, itr->m_BlockType, itr->m_BlockMeta);
- itr = m_SetBlockQueue.erase(itr);
+ // Not yet
+ ++itr;
+ continue;
}
} // for itr - m_SetBlockQueue[]
}