summaryrefslogtreecommitdiffstats
path: root/source/Simulator/RedstoneSimulator.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-23 00:15:59 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-23 00:15:59 +0100
commit6a051b7cd88d3c547e1c257972d7299b0df9c32a (patch)
tree33c46d027f70a3cf69f99570e080e5aa8fc64945 /source/Simulator/RedstoneSimulator.cpp
parentFixed some piston bugs (diff)
downloadcuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar
cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.gz
cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.bz2
cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.lz
cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.xz
cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.zst
cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.zip
Diffstat (limited to 'source/Simulator/RedstoneSimulator.cpp')
-rw-r--r--source/Simulator/RedstoneSimulator.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/Simulator/RedstoneSimulator.cpp b/source/Simulator/RedstoneSimulator.cpp
index 15d954313..76a4dafb0 100644
--- a/source/Simulator/RedstoneSimulator.cpp
+++ b/source/Simulator/RedstoneSimulator.cpp
@@ -431,8 +431,6 @@ void cRedstoneSimulator::HandleRedstoneWire(int a_BlockX, int a_BlockY, int a_Bl
if (m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) != 0) // A powered wire
{
- //SetBlockPowered(a_BlockX, a_BlockY - 1, a_BlockZ, a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_WIRE); // No matter what, block underneath gets powered
-
switch (GetWireDirection(a_BlockX, a_BlockY, a_BlockZ))
{
case REDSTONE_NONE:
@@ -496,7 +494,10 @@ void cRedstoneSimulator::HandleRedstoneRepeater(int a_BlockX, int a_BlockY, int
{
// We do this so that the repeater can continually update block power status (without being affected by it's own block type, which would happen if the block powering code was in an IF statement)
bool IsOn = false;
- if (a_MyState == E_BLOCK_REDSTONE_REPEATER_ON) { IsOn = true; }
+ if (a_MyState == E_BLOCK_REDSTONE_REPEATER_ON)
+ {
+ IsOn = true;
+ }
NIBBLETYPE a_Meta = m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
@@ -533,7 +534,10 @@ void cRedstoneSimulator::HandleRedstoneRepeater(int a_BlockX, int a_BlockY, int
}
else
{
- if (IsOn) { m_World.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_REPEATER_OFF, a_Meta); }
+ if (IsOn)
+ {
+ m_World.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_REPEATER_OFF, a_Meta);
+ }
}
return;
}
@@ -1060,6 +1064,7 @@ void cRedstoneSimulator::SetAllDirsAsPowered(int a_BlockX, int a_BlockY, int a_B
{ 0, 0, 1 },
{ 0, 0,-1 },
{ 0, 1, 0 },
+ { 0,-1, 0 }
};
for (int i = 0; i < ARRAYCOUNT(gCrossCoords); i++)