Keep lobby open in the background during internet games. Show the lobby after the game finished. Re-open the game. Start and stop irc thread together with the client thread.
This commit is contained in:
@@ -1126,6 +1126,7 @@ ServerGameStateNextGameDelay::Process(ServerGameThread &server)
|
||||
|
||||
// Wait for the start of a new game.
|
||||
server.SetState(ServerGameStateInit::Instance());
|
||||
server.GetLobbyThread().NotifyReopeningGame(server.GetId());
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
||||
@@ -162,6 +162,14 @@ ServerLobbyThread::NotifyStartingGame(unsigned gameId)
|
||||
m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game);
|
||||
}
|
||||
|
||||
void
|
||||
ServerLobbyThread::NotifyReopeningGame(unsigned gameId)
|
||||
{
|
||||
boost::shared_ptr<NetPacket> packet = CreateNetPacketGameListUpdate(gameId, GAME_MODE_CREATED);
|
||||
m_sessionManager.SendToAllSessions(GetSender(), packet, SessionData::Established);
|
||||
m_gameSessionManager.SendToAllSessions(GetSender(), packet, SessionData::Game);
|
||||
}
|
||||
|
||||
void
|
||||
ServerLobbyThread::HandleGameRetrievePlayerInfo(SessionWrapper session, const NetPacketRetrievePlayerInfo &tmpPacket)
|
||||
{
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
void NotifyPlayerJoinedGame(unsigned gameId, unsigned playerId);
|
||||
void NotifyPlayerLeftGame(unsigned gameId, unsigned playerId);
|
||||
void NotifyStartingGame(unsigned gameId);
|
||||
void NotifyReopeningGame(unsigned gameId);
|
||||
|
||||
void HandleGameRetrievePlayerInfo(SessionWrapper session, const NetPacketRetrievePlayerInfo &tmpPacket);
|
||||
void HandleGameRetrieveAvatar(SessionWrapper session, const NetPacketRetrieveAvatar &tmpPacket);
|
||||
|
||||
Reference in New Issue
Block a user