summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgaurav sehgal <gauravsehgal93@gmail.com>2016-07-07 09:55:07 +0200
committerMattes D <github@xoft.cz>2016-07-07 09:55:07 +0200
commit97b9422a3e49af9716914001ae432ecdf1818fb0 (patch)
tree9a574aa898ef583978f56cee926e66cffdfb5a4c
parentAdded Server OS section pr template (#3254) (diff)
downloadcuberite-97b9422a3e49af9716914001ae432ecdf1818fb0.tar
cuberite-97b9422a3e49af9716914001ae432ecdf1818fb0.tar.gz
cuberite-97b9422a3e49af9716914001ae432ecdf1818fb0.tar.bz2
cuberite-97b9422a3e49af9716914001ae432ecdf1818fb0.tar.lz
cuberite-97b9422a3e49af9716914001ae432ecdf1818fb0.tar.xz
cuberite-97b9422a3e49af9716914001ae432ecdf1818fb0.tar.zst
cuberite-97b9422a3e49af9716914001ae432ecdf1818fb0.zip
-rw-r--r--src/Blocks/BlockTrapdoor.h4
-rw-r--r--src/Blocks/BroadcastInterface.h7
-rw-r--r--src/World.h2
3 files changed, 9 insertions, 4 deletions
diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h
index e9e1f7794..71fe4c6bb 100644
--- a/src/Blocks/BlockTrapdoor.h
+++ b/src/Blocks/BlockTrapdoor.h
@@ -39,9 +39,7 @@ public:
// Flip the ON bit on / off using the XOR bitwise operation
NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x04);
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
-
- cWorld * World = static_cast<cWorld *>(&a_WorldInterface);
- World->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_DOOR_OPEN_CLOSE, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle());
+ a_WorldInterface.GetBroadcastManager().BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_DOOR_OPEN_CLOSE, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle());
return true;
}
diff --git a/src/Blocks/BroadcastInterface.h b/src/Blocks/BroadcastInterface.h
index ab101e1f6..e813be2a5 100644
--- a/src/Blocks/BroadcastInterface.h
+++ b/src/Blocks/BroadcastInterface.h
@@ -1,6 +1,12 @@
#pragma once
+#include "EffectID.h"
+
+
+
+
+
class cBroadcastInterface
{
public:
@@ -9,4 +15,5 @@ public:
virtual void BroadcastUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
virtual void BroadcastSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = nullptr) = 0;
virtual void BroadcastEntityAnimation(const cEntity & a_Entity, char a_Animation, const cClientHandle * a_Exclude = nullptr) = 0;
+ virtual void BroadcastSoundParticleEffect(const EffectID a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude = nullptr) = 0;
};
diff --git a/src/World.h b/src/World.h
index faddc6f59..368828225 100644
--- a/src/World.h
+++ b/src/World.h
@@ -212,7 +212,7 @@ public:
void BroadcastScoreUpdate (const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode);
void BroadcastDisplayObjective (const AString & a_Objective, cScoreboard::eDisplaySlot a_Display);
void BroadcastSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = nullptr) override; // tolua_export
- void BroadcastSoundParticleEffect (const EffectID a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude = nullptr); // tolua_export
+ virtual void BroadcastSoundParticleEffect (const EffectID a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude = nullptr) override; // tolua_export
void BroadcastSpawnEntity (cEntity & a_Entity, const cClientHandle * a_Exclude = nullptr);
void BroadcastTeleportEntity (const cEntity & a_Entity, const cClientHandle * a_Exclude = nullptr);
void BroadcastThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ, const cClientHandle * a_Exclude = nullptr);