send team update after restart
This commit is contained in:
@@ -100,6 +100,17 @@ void ServerGame::BalanceTeams() {
|
||||
}
|
||||
}
|
||||
|
||||
void ServerGame::Reset() {
|
||||
Game::Reset();
|
||||
|
||||
// update players teams to none
|
||||
for (auto& playerInfo : m_Players) {
|
||||
game::Player& player = playerInfo.second;
|
||||
protocol::UpdatePlayerTeamPacket packet(player.GetID(), player.GetTeamColor());
|
||||
m_Server->BroadcastPacket(&packet);
|
||||
}
|
||||
}
|
||||
|
||||
void ServerGame::OnGameStateUpdate(game::GameState newState) {
|
||||
SetGameState(newState);
|
||||
protocol::UpdateGameStatePacket packet(newState);
|
||||
|
||||
Reference in New Issue
Block a user