summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-03-03 20:52:08 +0100
committerMattes D <github@xoft.cz>2014-03-03 20:52:08 +0100
commit71ae689eb71ce5ced58b19460a8d8137722ce357 (patch)
treeacbb99403541d778513d4e2dcfd243a19c368bc9 /src/Simulator/IncrementalRedstoneSimulator.cpp
parentMerge pull request #748 from xdot/master (diff)
parentAdd cancelling to WeatherChanging event. (diff)
downloadcuberite-71ae689eb71ce5ced58b19460a8d8137722ce357.tar
cuberite-71ae689eb71ce5ced58b19460a8d8137722ce357.tar.gz
cuberite-71ae689eb71ce5ced58b19460a8d8137722ce357.tar.bz2
cuberite-71ae689eb71ce5ced58b19460a8d8137722ce357.tar.lz
cuberite-71ae689eb71ce5ced58b19460a8d8137722ce357.tar.xz
cuberite-71ae689eb71ce5ced58b19460a8d8137722ce357.tar.zst
cuberite-71ae689eb71ce5ced58b19460a8d8137722ce357.zip
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator.cpp')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index 0640227b0..f377b0aa7 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -937,17 +937,15 @@ void cIncrementalRedstoneSimulator::HandleTrapdoor(int a_BlockX, int a_BlockY, i
{
if (!AreCoordsSimulated(a_BlockX, a_BlockY, a_BlockZ, true))
{
- m_World.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) | 0x4);
- m_World.BroadcastSoundParticleEffect(1003, a_BlockX, a_BlockY, a_BlockZ, 0);
+ m_World.SetTrapdoorOpen(a_BlockX, a_BlockY, a_BlockZ, true);
SetPlayerToggleableBlockAsSimulated(a_BlockX, a_BlockY, a_BlockZ, true);
- }
+ }
}
else
{
if (!AreCoordsSimulated(a_BlockX, a_BlockY, a_BlockZ, false))
{
- m_World.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0xB); // Take into account that the fourth bit is needed for trapdoors too
- m_World.BroadcastSoundParticleEffect(1003, a_BlockX, a_BlockY, a_BlockZ, 0);
+ m_World.SetTrapdoorOpen(a_BlockX, a_BlockY, a_BlockZ, false);
SetPlayerToggleableBlockAsSimulated(a_BlockX, a_BlockY, a_BlockZ, false);
}
}