fix player login

This commit is contained in:
2023-08-15 19:20:13 +02:00
parent debf9e974c
commit a36716d8e4

View File

@@ -119,12 +119,12 @@ void ServerConnexion::HandlePacket(const protocol::PlayerLoginPacket* packet) {
protocol::UpdateGameStatePacket statePacket(m_Server->GetGame().GetGameState());
SendPacket(&statePacket);
m_Server->GetGame().NotifyListeners(&game::GameListener::OnPlayerJoin, m_ID);
protocol::WorldBeginDataPacket headerDataPacket(m_Server->GetGame().GetWorld());
protocol::WorldDataPacket dataPacket(m_Server->GetGame().GetWorld());
SendPacket(&headerDataPacket);
SendPacket(&dataPacket);
m_Server->GetGame().NotifyListeners(&game::GameListener::OnPlayerJoin, m_ID);
}
}