From 1394fc8eb5c8c0ac49bb64ce1871a80470f058c3 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 6 Apr 2021 12:26:43 +0100 Subject: Streamline player abilities handling * Update player list gamemode on world change * Fix invisibility for spectators, use entity metadata * Populate m_World for cPlayers on load - Remove SendPlayerMaxSpeed, a duplicate of SendEntityProperties --- src/Broadcaster.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Broadcaster.cpp') diff --git a/src/Broadcaster.cpp b/src/Broadcaster.cpp index 09b834471..770a3987c 100644 --- a/src/Broadcaster.cpp +++ b/src/Broadcaster.cpp @@ -345,6 +345,19 @@ void cWorld::BroadcastEntityPosition(const cEntity & a_Entity, const cClientHand +void cWorld::BroadcastEntityProperties(const cEntity & a_Entity) +{ + ForClientsWithEntity(a_Entity, *this, nullptr, [&](cClientHandle & a_Client) + { + a_Client.SendEntityProperties(a_Entity); + } + ); +} + + + + + void cWorld::BroadcastEntityStatus(const cEntity & a_Entity, Int8 a_Status, const cClientHandle * a_Exclude) { ForClientsWithEntity(a_Entity, *this, a_Exclude, [&](cClientHandle & a_Client) -- cgit v1.2.3