From 39a235d0206ccf82194f47116c36832cf22fdad0 Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 13 Nov 2010 12:37:28 +0000 Subject: [PATCH] Mark game as running when start process is initiated. --- src/net/common/servergame.cpp | 1 - src/net/common/servergamestate.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 25246422..ef9e639a 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -288,7 +288,6 @@ ServerGame::InternalStartGame() GuiInterface &gui = GetGui(); m_game.reset(new Game(&gui, factory, playerData, GetGameData(), GetStartData(), GetNextGameNum())); - GetLobbyThread().NotifyStartingGame(GetId()); GetDatabase().AsyncCreateGame(GetId(), GetName()); InitRankingMap(playerData); } diff --git a/src/net/common/servergamestate.cpp b/src/net/common/servergamestate.cpp index 2821e2d7..a343605c 100644 --- a/src/net/common/servergamestate.cpp +++ b/src/net/common/servergamestate.cpp @@ -535,6 +535,8 @@ ServerGameStateInit::SendStartEvent(ServerGame &server, bool fillWithComputerPla // Wait for all players to confirm start of game. server.SendToAllPlayers(packet, SessionData::Game); + // Notify lobby that this game is running. + server.GetLobbyThread().NotifyStartingGame(server.GetId()); server.SetState(ServerGameStateStartGame::Instance()); }