Mark game as running when start process is initiated.
This commit is contained in:
@@ -288,7 +288,6 @@ ServerGame::InternalStartGame()
|
|||||||
GuiInterface &gui = GetGui();
|
GuiInterface &gui = GetGui();
|
||||||
m_game.reset(new Game(&gui, factory, playerData, GetGameData(), GetStartData(), GetNextGameNum()));
|
m_game.reset(new Game(&gui, factory, playerData, GetGameData(), GetStartData(), GetNextGameNum()));
|
||||||
|
|
||||||
GetLobbyThread().NotifyStartingGame(GetId());
|
|
||||||
GetDatabase().AsyncCreateGame(GetId(), GetName());
|
GetDatabase().AsyncCreateGame(GetId(), GetName());
|
||||||
InitRankingMap(playerData);
|
InitRankingMap(playerData);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -535,6 +535,8 @@ ServerGameStateInit::SendStartEvent(ServerGame &server, bool fillWithComputerPla
|
|||||||
|
|
||||||
// Wait for all players to confirm start of game.
|
// Wait for all players to confirm start of game.
|
||||||
server.SendToAllPlayers(packet, SessionData::Game);
|
server.SendToAllPlayers(packet, SessionData::Game);
|
||||||
|
// Notify lobby that this game is running.
|
||||||
|
server.GetLobbyThread().NotifyStartingGame(server.GetId());
|
||||||
|
|
||||||
server.SetState(ServerGameStateStartGame::Instance());
|
server.SetState(ServerGameStateStartGame::Instance());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user