diff options
author | worktycho <work.tycho@gmail.com> | 2014-06-22 15:15:41 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2014-06-22 15:15:41 +0200 |
commit | 119ba562d50442ad78fc2dd573819759faadad44 (patch) | |
tree | ea83fc8171fe96273c9a51890a1b1d982408068a /src | |
parent | Added cClientHandle::IsUUIDOnline function. (diff) | |
download | cuberite-119ba562d50442ad78fc2dd573819759faadad44.tar cuberite-119ba562d50442ad78fc2dd573819759faadad44.tar.gz cuberite-119ba562d50442ad78fc2dd573819759faadad44.tar.bz2 cuberite-119ba562d50442ad78fc2dd573819759faadad44.tar.lz cuberite-119ba562d50442ad78fc2dd573819759faadad44.tar.xz cuberite-119ba562d50442ad78fc2dd573819759faadad44.tar.zst cuberite-119ba562d50442ad78fc2dd573819759faadad44.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp index 183c527ca..ad4d1bee6 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator.cpp @@ -758,7 +758,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneRepeater(int a_RelBlockX, int void cIncrementalRedstoneSimulator::HandleRedstoneRepeaterDelays() { - for (RepeatersDelayList::iterator itr = m_RepeatersDelayList->begin(); itr != m_RepeatersDelayList->end(); itr++) + for (RepeatersDelayList::iterator itr = m_RepeatersDelayList->begin(); itr != m_RepeatersDelayList->end();) { if (itr->a_ElapsedTicks >= itr->a_DelayTicks) // Has the elapsed ticks reached the target ticks? @@ -804,7 +804,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneRepeaterDelays() { m_Chunk->SetBlock(RelBlockX, RelBlockY, RelBlockZ, E_BLOCK_REDSTONE_REPEATER_OFF, Meta); } - m_RepeatersDelayList->erase(itr); + itr = m_RepeatersDelayList->erase(itr); } else { @@ -813,6 +813,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneRepeaterDelays() // I am confounded to say why. Perhaps optimisation failure. LOGD("Incremented a repeater @ {%i %i %i} | Elapsed ticks: %i | Target delay: %i", itr->a_RelBlockPos.x, itr->a_RelBlockPos.y, itr->a_RelBlockPos.z, itr->a_ElapsedTicks, itr->a_DelayTicks); itr->a_ElapsedTicks++; + itr++; } } } |