Send lobby etc. notifications also to players in state "spectator waiting".

This commit is contained in:
lotodore
2013-09-01 18:09:15 +02:00
parent 298aeaed4c
commit e008ef9ad5
4 changed files with 28 additions and 28 deletions
+2 -2
View File
@@ -628,7 +628,7 @@ ServerGame::GetPlayerIdList() const
PlayerIdList
ServerGame::GetSpectatorIdList() const
{
return GetSessionManager().GetPlayerIdList(SessionData::Spectating);
return GetSessionManager().GetPlayerIdList(SessionData::Spectating | SessionData::SpectatorWaiting);
}
bool
@@ -909,7 +909,7 @@ ServerGame::RemovePlayerData(boost::shared_ptr<PlayerData> player, int reason, b
netPlayerLeft->set_playerid(player->GetUniqueId());
netPlayerLeft->set_gameplayerleftreason(netReason);
}
GetSessionManager().SendToAllSessions(GetLobbyThread().GetSender(), thisPlayerLeft, SessionData::Game);
GetSessionManager().SendToAllSessions(GetLobbyThread().GetSender(), thisPlayerLeft, SessionData::Game | SessionData::Spectating | SessionData::SpectatorWaiting);
GetState().NotifySessionRemoved(shared_from_this());
if (spectateOnly) {