summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-02 19:46:00 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-02 19:46:00 +0200
commit19caba5125e457a9663102989ea717898e3c2827 (patch)
tree5ddd30ef142ad0f6d962e851c275687f5ab07f2e /src/Blocks
parentFixed printf formats for Win builds (diff)
downloadcuberite-19caba5125e457a9663102989ea717898e3c2827.tar
cuberite-19caba5125e457a9663102989ea717898e3c2827.tar.gz
cuberite-19caba5125e457a9663102989ea717898e3c2827.tar.bz2
cuberite-19caba5125e457a9663102989ea717898e3c2827.tar.lz
cuberite-19caba5125e457a9663102989ea717898e3c2827.tar.xz
cuberite-19caba5125e457a9663102989ea717898e3c2827.tar.zst
cuberite-19caba5125e457a9663102989ea717898e3c2827.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockButton.h1
-rw-r--r--src/Blocks/BlockLever.h1
-rw-r--r--src/Blocks/WorldInterface.h3
3 files changed, 5 insertions, 0 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h
index 7d9af207d..ada7d58f7 100644
--- a/src/Blocks/BlockButton.h
+++ b/src/Blocks/BlockButton.h
@@ -23,6 +23,7 @@ public:
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) | 0x08);
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
+ a_WorldInterface.WakeUpSimulators(a_BlockX, a_BlockY, a_BlockZ);
a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
// Queue a button reset (unpress)
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index afe43abf8..4e745d413 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -23,6 +23,7 @@ public:
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x08);
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
+ a_WorldInterface.WakeUpSimulators(a_BlockX, a_BlockY, a_BlockZ);
a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
}
diff --git a/src/Blocks/WorldInterface.h b/src/Blocks/WorldInterface.h
index 650a216c0..251b28d03 100644
--- a/src/Blocks/WorldInterface.h
+++ b/src/Blocks/WorldInterface.h
@@ -46,4 +46,7 @@ public:
virtual void SetTimeOfDay(Int64 a_TimeOfDay) = 0;
+ /** Wakes up the simulators for the specified block */
+ virtual void WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
+
};