summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-06-16 16:29:49 +0200
committerTycho <work.tycho+git@gmail.com>2014-06-16 16:29:49 +0200
commit3a7c0c8ce9ff323690293dda6c8d2066db7ba985 (patch)
treec48efec43a257e9351d73428fa54b0d32964b05f
parentMerge branch 'master' into redstonerefactor (diff)
downloadcuberite-3a7c0c8ce9ff323690293dda6c8d2066db7ba985.tar
cuberite-3a7c0c8ce9ff323690293dda6c8d2066db7ba985.tar.gz
cuberite-3a7c0c8ce9ff323690293dda6c8d2066db7ba985.tar.bz2
cuberite-3a7c0c8ce9ff323690293dda6c8d2066db7ba985.tar.lz
cuberite-3a7c0c8ce9ff323690293dda6c8d2066db7ba985.tar.xz
cuberite-3a7c0c8ce9ff323690293dda6c8d2066db7ba985.tar.zst
cuberite-3a7c0c8ce9ff323690293dda6c8d2066db7ba985.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index 2e73195f1..79c23a7ba 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -501,20 +501,12 @@ void cIncrementalRedstoneSimulator::HandleRedstoneLever(int a_RelBlockX, int a_R
eBlockFace Dir = cBlockLeverHandler::BlockMetaDataToBlockFace(Meta);
switch (Dir) // Now, flip the direction into the type used by SetBlockLinkedPowered()
{
- case BLOCK_FACE_YP:
- case BLOCK_FACE_XP:
- case BLOCK_FACE_ZP:
- {
- Dir--;
- break;
- }
- case BLOCK_FACE_XM:
- case BLOCK_FACE_ZM:
- case BLOCK_FACE_YM:
- {
- Dir++;
- break;
- }
+ case BLOCK_FACE_YP: Dir = BLOCK_FACE_YM; break;
+ case BLOCK_FACE_XP: Dir = BLOCK_FACE_XM; break;
+ case BLOCK_FACE_ZP: Dir = BLOCK_FACE_ZM; break;
+ case BLOCK_FACE_YM: Dir = BLOCK_FACE_YP; break;
+ case BLOCK_FACE_XM: Dir = BLOCK_FACE_XP; break;
+ case BLOCK_FACE_ZM :Dir = BLOCK_FACE_ZP; break;
default:
{
ASSERT(!"Unhandled lever metadata!");