summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-05 16:43:45 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-05 16:43:45 +0200
commitbde40af40664e0b526fed8224c1f00531c5610c6 (patch)
tree2972fd815f11dbd852c17fa0c13fbf7cb70f1358 /src
parentMerge pull request #956 from mc-server/redstoneimprovements (diff)
downloadcuberite-bde40af40664e0b526fed8224c1f00531c5610c6.tar
cuberite-bde40af40664e0b526fed8224c1f00531c5610c6.tar.gz
cuberite-bde40af40664e0b526fed8224c1f00531c5610c6.tar.bz2
cuberite-bde40af40664e0b526fed8224c1f00531c5610c6.tar.lz
cuberite-bde40af40664e0b526fed8224c1f00531c5610c6.tar.xz
cuberite-bde40af40664e0b526fed8224c1f00531c5610c6.tar.zst
cuberite-bde40af40664e0b526fed8224c1f00531c5610c6.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index 3e8a4dec0..f12bd6d49 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -444,7 +444,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneLever(int a_RelBlockX, int a_R
SetAllDirsAsPowered(a_RelBlockX, a_RelBlockY, a_RelBlockZ);
NIBBLETYPE Dir = cBlockLeverHandler::BlockMetaDataToBlockFace(Meta);
- switch (Dir)
+ switch (Dir) // Now, flip the direction into the type used by SetBlockLinkedPowered()
{
case BLOCK_FACE_YP:
case BLOCK_FACE_XP:
@@ -510,9 +510,10 @@ void cIncrementalRedstoneSimulator::HandleRedstoneButton(int a_RelBlockX, int a_
NIBBLETYPE Meta = m_Chunk->GetMeta(a_RelBlockX, a_RelBlockY, a_RelBlockZ);
if (IsButtonOn(Meta))
{
- SetAllDirsAsPowered(a_RelBlockX, a_RelBlockY, a_RelBlockZ);NIBBLETYPE Dir = cBlockButtonHandler::BlockMetaDataToBlockFace(Meta);
-
- switch (Dir)
+ SetAllDirsAsPowered(a_RelBlockX, a_RelBlockY, a_RelBlockZ);
+
+ NIBBLETYPE Dir = cBlockButtonHandler::BlockMetaDataToBlockFace(Meta);
+ switch (Dir) // Now, flip the direction into the type used by SetBlockLinkedPowered()
{
case BLOCK_FACE_XP:
case BLOCK_FACE_ZP: