diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-18 23:30:34 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-18 23:30:34 +0100 |
commit | bc1e236d547479833cc4f8d8218064cbdb9dfc0d (patch) | |
tree | 8b40bc3a6d5a7b6828d72095afc7c8dfbf5137d5 /source/Chunk.cpp | |
parent | Mineshafts: silenced a compiler warning. (diff) | |
download | cuberite-bc1e236d547479833cc4f8d8218064cbdb9dfc0d.tar cuberite-bc1e236d547479833cc4f8d8218064cbdb9dfc0d.tar.gz cuberite-bc1e236d547479833cc4f8d8218064cbdb9dfc0d.tar.bz2 cuberite-bc1e236d547479833cc4f8d8218064cbdb9dfc0d.tar.lz cuberite-bc1e236d547479833cc4f8d8218064cbdb9dfc0d.tar.xz cuberite-bc1e236d547479833cc4f8d8218064cbdb9dfc0d.tar.zst cuberite-bc1e236d547479833cc4f8d8218064cbdb9dfc0d.zip |
Diffstat (limited to 'source/Chunk.cpp')
-rw-r--r-- | source/Chunk.cpp | 14 |
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[] } |