Fixing state transition when joining a game. Since this is synchronous now, order is important.

This commit is contained in:
lotodore
2009-06-20 12:14:06 +00:00
parent 470bbb5eed
commit a284f27750
+2 -2
View File
@@ -211,10 +211,10 @@ ServerLobbyThread::MoveSessionToGame(ServerGame &game, SessionWrapper session)
session.sessionData->SetState(SessionData::Game); session.sessionData->SetState(SessionData::Game);
// Store it in the list of game sessions. // Store it in the list of game sessions.
m_gameSessionManager.AddSession(session); m_gameSessionManager.AddSession(session);
// Add session to the game.
game.AddSession(session);
// Set the game id of the session. // Set the game id of the session.
session.sessionData->SetGameId(game.GetId()); session.sessionData->SetGameId(game.GetId());
// Add session to the game.
game.AddSession(session);
} }
void void