summaryrefslogtreecommitdiffstats
path: root/src/Broadcaster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Broadcaster.cpp')
-rw-r--r--src/Broadcaster.cpp38
1 files changed, 6 insertions, 32 deletions
diff --git a/src/Broadcaster.cpp b/src/Broadcaster.cpp
index 3534e0bd0..1c59405e9 100644
--- a/src/Broadcaster.cpp
+++ b/src/Broadcaster.cpp
@@ -197,11 +197,11 @@ void cWorld::BroadcastChat(const cCompositeChat & a_Message, const cClientHandle
-void cWorld::BroadcastCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player, int a_Count, const cClientHandle * a_Exclude)
+void cWorld::BroadcastCollectEntity(const cEntity & a_Collected, const cEntity & a_Collector, unsigned a_Count, const cClientHandle * a_Exclude)
{
- ForClientsWithEntity(a_Entity, *this, a_Exclude, [&](cClientHandle & a_Client)
+ ForClientsWithEntity(a_Collected, *this, a_Exclude, [&](cClientHandle & a_Client)
{
- a_Client.SendCollectEntity(a_Entity, a_Player, a_Count);
+ a_Client.SendCollectEntity(a_Collected, a_Collector, a_Count);
}
);
}
@@ -314,24 +314,11 @@ void cWorld::BroadcastEntityMetadata(const cEntity & a_Entity, const cClientHand
-void cWorld::BroadcastEntityRelMove(const cEntity & a_Entity, Vector3<Int8> a_RelMove, const cClientHandle * a_Exclude)
+void cWorld::BroadcastEntityPosition(const cEntity & a_Entity, const cClientHandle * a_Exclude)
{
- ForClientsWithEntity(a_Entity, *this, a_Exclude, [&](cClientHandle & a_Client)
- {
- a_Client.SendEntityRelMove(a_Entity, a_RelMove.x, a_RelMove.y, a_RelMove.z);
- }
- );
-}
-
-
-
-
-
-void cWorld::BroadcastEntityRelMoveLook(const cEntity & a_Entity, Vector3<Int8> a_RelMove, const cClientHandle * a_Exclude)
-{
- ForClientsWithEntity(a_Entity, *this, a_Exclude, [&](cClientHandle & a_Client)
+ ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
{
- a_Client.SendEntityRelMoveLook(a_Entity, a_RelMove.x, a_RelMove.y, a_RelMove.z);
+ a_Client.SendEntityPosition(a_Entity);
}
);
}
@@ -561,19 +548,6 @@ void cWorld::BroadcastSpawnEntity(cEntity & a_Entity, const cClientHandle * a_Ex
-void cWorld::BroadcastTeleportEntity(const cEntity & a_Entity, const cClientHandle * a_Exclude)
-{
- ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
- {
- a_Client.SendTeleportEntity(a_Entity);
- }
- );
-}
-
-
-
-
-
void cWorld::BroadcastThunderbolt(Vector3i a_BlockPos, const cClientHandle * a_Exclude)
{
ForClientsWithChunkAtPos(a_BlockPos, *this, a_Exclude, [&](cClientHandle & a_Client)