summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-03-02 16:01:37 +0100
committerHowaner <franzi.moos@googlemail.com>2014-03-02 16:01:37 +0100
commite4b2502896febbbf1d53fee1970e973bc6afde04 (patch)
treecaa595d1275ec844c8d89ae037a95991f465d5a6 /src/Simulator/IncrementalRedstoneSimulator.cpp
parentUse switch in GetStepSound (diff)
downloadcuberite-e4b2502896febbbf1d53fee1970e973bc6afde04.tar
cuberite-e4b2502896febbbf1d53fee1970e973bc6afde04.tar.gz
cuberite-e4b2502896febbbf1d53fee1970e973bc6afde04.tar.bz2
cuberite-e4b2502896febbbf1d53fee1970e973bc6afde04.tar.lz
cuberite-e4b2502896febbbf1d53fee1970e973bc6afde04.tar.xz
cuberite-e4b2502896febbbf1d53fee1970e973bc6afde04.tar.zst
cuberite-e4b2502896febbbf1d53fee1970e973bc6afde04.zip
Diffstat (limited to '')
-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 91de9e0cc..74b30f920 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);
}
}