Fixing state transition when joining a game. Since this is synchronous now, order is important.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user