summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-12 18:13:39 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-12 18:13:52 +0200
commit1bce1ac4327965453d7709503c5f0b4d8b3edea6 (patch)
tree7a97eb85a7ac69a3707ebbf7f3eb6f4b5be544a2 /src
parentMerge pull request #1082 from mc-server/cauldronfixes (diff)
downloadcuberite-1bce1ac4327965453d7709503c5f0b4d8b3edea6.tar
cuberite-1bce1ac4327965453d7709503c5f0b4d8b3edea6.tar.gz
cuberite-1bce1ac4327965453d7709503c5f0b4d8b3edea6.tar.bz2
cuberite-1bce1ac4327965453d7709503c5f0b4d8b3edea6.tar.lz
cuberite-1bce1ac4327965453d7709503c5f0b4d8b3edea6.tar.xz
cuberite-1bce1ac4327965453d7709503c5f0b4d8b3edea6.tar.zst
cuberite-1bce1ac4327965453d7709503c5f0b4d8b3edea6.zip
Diffstat (limited to 'src')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index b32a57165..eff11bd01 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -65,6 +65,7 @@ void cIncrementalRedstoneSimulator::RedstoneAddBlock(int a_BlockX, int a_BlockY,
RelX = a_BlockX - a_OtherChunk->GetPosX() * cChunkDef::Width;
RelZ = a_BlockZ - a_OtherChunk->GetPosZ() * cChunkDef::Width;
a_OtherChunk->GetBlockTypeMeta(RelX, a_BlockY, RelZ, Block, Meta);
+ a_OtherChunk->SetIsRedstoneDirty(true);
}
else
{
@@ -199,6 +200,7 @@ void cIncrementalRedstoneSimulator::RedstoneAddBlock(int a_BlockX, int a_BlockY,
}
else
{
+ itr->DataTwo = false;
itr->Data = Block; // Update block information
}
return;
@@ -802,11 +804,15 @@ void cIncrementalRedstoneSimulator::HandleRedstoneRepeater(int a_RelBlockX, int
{
if (a_Itr->a_RelBlockPos == Vector3i(a_RelBlockX, a_RelBlockY, a_RelBlockZ))
{
+ // Leave a_Itr at where we found the entry
break;
}
}
}
+ // a_Itr may be passed with m_RepeatersDelayList::end, however, we can guarantee this iterator is always valid because...
+ // ...QueueRepeaterPowerChange is called to add an entry (and the above code updates iterator). However, if the repeater was locked or something similar...
+ // ...we will never get here because of the returns.
if (a_Itr->a_ElapsedTicks >= a_Itr->a_DelayTicks) // Has the elapsed ticks reached the target ticks?
{
if (a_Itr->ShouldPowerOn)