[wesnoth-commits] [wesnoth/wesnoth] ef4ae1: allow non hosts to change factions later.

GitHub noreply at github.com
Fri Jun 29 22:57:33 UTC 2018


  Branch: refs/heads/1.14
  Home:   https://github.com/wesnoth/wesnoth
  Commit: ef4ae1cf5d54cf168c9bd300d374899511071d32
      https://github.com/wesnoth/wesnoth/commit/ef4ae1cf5d54cf168c9bd300d374899511071d32
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-06-30 (Sat, 30 Jun 2018)

  Changed paths:
    M data/gui/window/mp_join_game.cfg
    M src/gui/dialogs/multiplayer/mp_join_game.cpp
    M src/gui/dialogs/multiplayer/mp_join_game.hpp

  Log Message:
  -----------
  allow non hosts to change factions later.

previously players had to leave an rejoin the game to change their faction.
this was most annoying in coop games where you want might want to choose
your faction in consultation with the other players. Also you previously could
not even checkout the different available factions again after you joined
the game.


  Commit: e72a92ac961a6b5e0b0f3c27c62cdcff4d3e4f4d
      https://github.com/wesnoth/wesnoth/commit/e72a92ac961a6b5e0b0f3c27c62cdcff4d3e4f4d
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-06-30 (Sat, 30 Jun 2018)

  Changed paths:
    M src/game_initialization/flg_manager.cpp
    M src/game_initialization/flg_manager.hpp
    M src/gui/dialogs/multiplayer/mp_join_game.cpp

  Log Message:
  -----------
  make flg manager not store confg& side_

in the non-host case the clients might get updates that change the [side] config while the flg dialog is open which might result in invalid pointers,  note that flg_manager::default_leader_cfg_ is still there but this is no problm because that is never dereferenced it's only compared to other pointers.

we also make a copy of all [multiplayer_side] on the non hosts side for the same reason.


  Commit: b8a119dfc5d4e859dc66adf7df52a956db1366f1
      https://github.com/wesnoth/wesnoth/commit/b8a119dfc5d4e859dc66adf7df52a956db1366f1
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-06-30 (Sat, 30 Jun 2018)

  Changed paths:
    M src/gui/dialogs/multiplayer/faction_select.cpp
    M src/gui/dialogs/multiplayer/faction_select.hpp
    M src/gui/dialogs/multiplayer/mp_join_game.cpp
    M src/gui/dialogs/multiplayer/mp_join_game.hpp
    A src/utils/scope_exit.hpp

  Log Message:
  -----------
  cancel faction_select when the game starts

or when the hosts assigned  control of  that side to another player.


  Commit: 75e0d082523e720d9b6ecc34147f0c35994cfbe3
      https://github.com/wesnoth/wesnoth/commit/75e0d082523e720d9b6ecc34147f0c35994cfbe3
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-06-30 (Sat, 30 Jun 2018)

  Changed paths:
    M src/gui/dialogs/multiplayer/mp_join_game.cpp
    M src/gui/dialogs/multiplayer/mp_join_game.hpp

  Log Message:
  -----------
  mp join: fix crash when the dialog is updated while the flg dialog is open.

we cannnot call show_flg_select from inside the select_leader_buttons callback because that select_leader_buttons might be deleted/recreated while that dialog is open whihc leads to crashes, so what we do is executing the show_flg_select
 in a seperate callstack by using a 0 ms non-repeating timer


  Commit: 50e297fbf1fa4549f2d90211ead1758cb8cd4b42
      https://github.com/wesnoth/wesnoth/commit/50e297fbf1fa4549f2d90211ead1758cb8cd4b42
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-06-30 (Sat, 30 Jun 2018)

  Changed paths:
    M src/gui/core/timer.cpp

  Log Message:
  -----------
  add a comment


  Commit: 9fdf301a530ff68a8f4677a146fb2fe8f84e0e29
      https://github.com/wesnoth/wesnoth/commit/9fdf301a530ff68a8f4677a146fb2fe8f84e0e29
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-06-30 (Sat, 30 Jun 2018)

  Changed paths:
    M src/gui/dialogs/multiplayer/mp_join_game.cpp
    M src/gui/dialogs/multiplayer/mp_join_game.hpp

  Log Message:
  -----------
  fix code dublication of mp_join_game::show_flg_select

this also fixes a bug where the side number in the initial flg dialog would be off by one.

This is also a slight behviour change where not finding [era] in mp_join_game::fetch_game_config no longer throws config::error but just returns false (=cannot join game)


Compare: https://github.com/wesnoth/wesnoth/compare/1fa01b3a1e09...9fdf301a530f
      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list