Added a player name to the PlayerSpawned event. When a player has spawned the server sends the name to the client which publishes the event.

This commit is contained in:
stiffly
2016-01-24 22:00:38 +01:00
parent 0c56a05144
commit 06f64f8fbf
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -147,6 +147,7 @@ void Client::parsePlayersSpawned(Packet& packet)
e.Player = EntityWrapper(m_World, m_ServerIDToClientID[packet.ReadPrimitive<EntityID>()]);
e.Spawner = EntityWrapper(m_World, m_ServerIDToClientID[packet.ReadPrimitive<EntityID>()]);
e.PlayerID = -1;
e.PlayerName = packet.ReadString();
m_EventBroker->Publish(e);
}