After a match one player might be the turn master and the other the game master. If then another match starts the previous turn master must become non turn master if he isn't game master as else there would be two turn masters. --- src/game/game.cpp | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/game/game.cpp b/src/game/game.cpp index f295456..f2b0bbc 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -672,9 +672,13 @@ void Game::RequestBonusBoxDrop() void Game::SetState(game_loop_state_t new_state, bool begin_game) { - if (begin_game && - (Network::GetInstance()->IsGameMaster() || Network::GetInstance()->IsLocal())) - Network::GetInstance()->SetTurnMaster(true); + if (begin_game) { + // Make the correct player the turn master, as else no player would be turn master for the first game. + // It's important that the other players get explicitly set to non turn master, + // because the wrong player might have the state turn master from the previous game. + bool turn_master = Network::GetInstance()->IsGameMaster() || Network::GetInstance()->IsLocal(); + Network::GetInstance()->SetTurnMaster(turn_master); + } // already in good state, nothing to do if ((state == new_state) && !begin_game) return; -- 1.6.0.4 _______________________________________________ Wormux-dev mailing list Wormux-dev@gna.org https://mail.gna.org/listinfo/wormux-dev