summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-02-04 19:59:05 +0100
committerTycho <work.tycho+git@gmail.com>2014-02-04 19:59:05 +0100
commit8464f689ea214d3c30105ae58539885cf1268317 (patch)
tree4e165031ed1528e4fd7c704850b62c543baf8d3f /src/Simulator
parentFixed calling plugins with userdata params. (diff)
downloadcuberite-8464f689ea214d3c30105ae58539885cf1268317.tar
cuberite-8464f689ea214d3c30105ae58539885cf1268317.tar.gz
cuberite-8464f689ea214d3c30105ae58539885cf1268317.tar.bz2
cuberite-8464f689ea214d3c30105ae58539885cf1268317.tar.lz
cuberite-8464f689ea214d3c30105ae58539885cf1268317.tar.xz
cuberite-8464f689ea214d3c30105ae58539885cf1268317.tar.zst
cuberite-8464f689ea214d3c30105ae58539885cf1268317.zip
Diffstat (limited to 'src/Simulator')
-rw-r--r--src/Simulator/RedstoneSimulator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Simulator/RedstoneSimulator.cpp b/src/Simulator/RedstoneSimulator.cpp
index 05badf0d4..6b7ae3196 100644
--- a/src/Simulator/RedstoneSimulator.cpp
+++ b/src/Simulator/RedstoneSimulator.cpp
@@ -1112,12 +1112,13 @@ bool cRedstoneSimulator::IsPistonPowered(int a_BlockX, int a_BlockY, int a_Block
// Pistons cannot be powered through their front face; this function verifies that a source meets this requirement
int OldX = a_BlockX, OldY = a_BlockY, OldZ = a_BlockZ;
+ eBlockFace Face = cPiston::MetaDataToDirection(a_Meta);
for (PoweredBlocksList::const_iterator itr = m_PoweredBlocks.begin(); itr != m_PoweredBlocks.end(); ++itr)
{
if (!itr->a_BlockPos.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ))) { continue; }
- AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_Meta); // Piston meta is based on what direction they face, so we can do this
+ AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, Face);
if (!itr->a_SourcePos.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ)))
{
@@ -1133,7 +1134,7 @@ bool cRedstoneSimulator::IsPistonPowered(int a_BlockX, int a_BlockY, int a_Block
{
if (!itr->a_BlockPos.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ))) { continue; }
- AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_Meta);
+ AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, Face);
if (!itr->a_MiddlePos.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ)))
{