summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
authorwiseoldman95 <wiseoldman95@users.noreply.github.com>2014-04-07 20:04:06 +0200
committerwiseoldman95 <wiseoldman95@users.noreply.github.com>2014-04-07 20:04:06 +0200
commitdab01b27c68036fff76edba0d96d518867c574a0 (patch)
tree898915574238863d7c43ac1bef80edc5ba4b8b05 /src/Simulator
parentRemoved stray IsLocked (diff)
downloadcuberite-dab01b27c68036fff76edba0d96d518867c574a0.tar
cuberite-dab01b27c68036fff76edba0d96d518867c574a0.tar.gz
cuberite-dab01b27c68036fff76edba0d96d518867c574a0.tar.bz2
cuberite-dab01b27c68036fff76edba0d96d518867c574a0.tar.lz
cuberite-dab01b27c68036fff76edba0d96d518867c574a0.tar.xz
cuberite-dab01b27c68036fff76edba0d96d518867c574a0.tar.zst
cuberite-dab01b27c68036fff76edba0d96d518867c574a0.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index ebe8e2541..8f82c454e 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -685,11 +685,10 @@ void cIncrementalRedstoneSimulator::HandleRedstoneRepeater(int a_BlockX, int a_B
{
// Create a variable holding my meta to avoid multiple lookups.
NIBBLETYPE a_Meta = m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
-
+ bool IsOn = (a_MyState == E_BLOCK_REDSTONE_REPEATER_ON);
+
if (!IsRepeaterLocked(a_BlockX, a_BlockY, a_BlockZ, a_Meta)) // If we're locked, change nothing. Otherwise:
{
- // Create a variable holding being on or self powered to avoid multiple lookups.
- bool IsOn = (a_MyState == E_BLOCK_REDSTONE_REPEATER_ON);
bool IsSelfPowered = IsRepeaterPowered(a_BlockX, a_BlockY, a_BlockZ, a_Meta);
if (IsSelfPowered && !IsOn) // Queue a power change if powered, but not on and not locked.
{