Automatically close games if only spectators are left.

This commit is contained in:
lotodore
2013-09-02 00:37:02 +02:00
parent eae6a6fae7
commit eb571a8640
3 changed files with 25 additions and 14 deletions
+1 -1
View File
@@ -1827,7 +1827,7 @@ ServerLobbyThread::TimerRemoveGame(const boost::system::error_code &ec)
GameMap::iterator next = i;
++next;
boost::shared_ptr<ServerGame> tmpGame = i->second;
if (!tmpGame->GetSessionManager().HasSessions())
if (!tmpGame->GetSessionManager().HasSessionWithState(SessionData::Game))
InternalRemoveGame(tmpGame); // This will delete the game.
i = next;
}