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
This commit is contained in:
Tiger Wang
2021-04-12 22:35:07 +01:00
parent 0f9d424427
commit 1394fc8eb5
16 changed files with 134 additions and 237 deletions
+13
View File
@@ -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)