From 74cd73058955683c277baf29f3cd7378c79292a9 Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 16 Jun 2014 18:06:09 +0100 Subject: FIxed second weird enum --- src/Simulator/IncrementalRedstoneSimulator.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/Simulator/IncrementalRedstoneSimulator.cpp') diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp index a49d0fb50..1e7ff543d 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator.cpp @@ -549,26 +549,7 @@ void cIncrementalRedstoneSimulator::HandleRedstoneButton(int a_RelBlockX, int a_ SetAllDirsAsPowered(a_RelBlockX, a_RelBlockY, a_RelBlockZ); eBlockFace Dir = cBlockButtonHandler::BlockMetaDataToBlockFace(Meta); - switch (Dir) // Now, flip the direction into the type used by SetBlockLinkedPowered() - { - case BLOCK_FACE_XP: - case BLOCK_FACE_ZP: - { - Dir--; - break; - } - case BLOCK_FACE_XM: - case BLOCK_FACE_ZM: - { - Dir++; - break; - } - default: - { - ASSERT(!"Unhandled button metadata!"); - return; - } - } + Dir = ReverseBlockFace(Dir); SetDirectionLinkedPowered(a_RelBlockX, a_RelBlockY, a_RelBlockZ, Dir); } } -- cgit v1.2.3