[Commits] [wesnoth/wesnoth] d25457: simplify fallback_ai_to_human_exception handling

GitHub noreply at github.com
Wed Sep 9 21:54:08 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: d2545777625f16ceeb0cc6708cb184dd2e264688
      https://github.com/wesnoth/wesnoth/commit/d2545777625f16ceeb0cc6708cb184dd2e264688
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  simplify fallback_ai_to_human_exception handling

the effect is sligltly different (the side is now permanently changed to
human) but since it quiet easy to change a side back to ai using debug
commands this shouldnt be that bad.


  Commit: 1172369dca92111024ec253028629cd92e475dab
      https://github.com/wesnoth/wesnoth/commit/1172369dca92111024ec253028629cd92e475dab
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  refactor playsingle_controller::play_side()


  Commit: ded13b1cc84eea20066e56a2a1ceedb82a55bab5
      https://github.com/wesnoth/wesnoth/commit/ded13b1cc84eea20066e56a2a1ceedb82a55bab5
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  refactor playsingle_controller::before_human_turn

Also removed a raise_turn_started event at the beginning of human turns
which didn't fire at the beginning of networked turns.

I don't know what the raise_turn_started did if this actually breaks
anything feel free to read it but please add a comment on why it fires
on human turns but not on networked turns.


  Commit: edd32073fafcb00597e8629914fa986f4d4464c7
      https://github.com/wesnoth/wesnoth/commit/edd32073fafcb00597e8629914fa986f4d4464c7
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playmp_controller.cpp
    M src/playmp_controller.hpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp

  Log Message:
  -----------
  move play_side to play_controller

the intention is that replay_controller can also use this function later


  Commit: d74b85fffc47cc52cc665366d18b184e69e99aca
      https://github.com/wesnoth/wesnoth/commit/d74b85fffc47cc52cc665366d18b184e69e99aca
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp

  Log Message:
  -----------
  set "side_number" in play_controller::do_init_side

instead of in play_controller::init_side_begin, the prviosul
implementation could change the value of this wml variable when
reloading.


  Commit: c910dc6533ea6b117997105bc9788dd891ca1bb5
      https://github.com/wesnoth/wesnoth/commit/c910dc6533ea6b117997105bc9788dd891ca1bb5
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  remove a unneeded if


  Commit: 11daa5113a2013f0489d1effcb94147bd2fe7886
      https://github.com/wesnoth/wesnoth/commit/11daa5113a2013f0489d1effcb94147bd2fe7886
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp
    M src/playturn.cpp

  Log Message:
  -----------
  refactor maybe_do_init_side

we now check for nit_side_done everytime the controller type changes
to that we don't have to check for that when recieveing a conroller
change in playturn.cpp

This also contains a unrelated fix (to the function that checks
which side can be seen) that got accidently merged into this commit.


  Commit: c8f9b2b530786abddc5ce78e54cfc6175c3e2954
      https://github.com/wesnoth/wesnoth/commit/c8f9b2b530786abddc5ce78e54cfc6175c3e2954
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp
    M src/replay.cpp

  Log Message:
  -----------
  move function play_turn from playsingle_controller to play_controller

the intention is that we can use those function in replay_controller.cpp


  Commit: 9d9422a4232459b766dff300326a6a0f166d74b9
      https://github.com/wesnoth/wesnoth/commit/9d9422a4232459b766dff300326a6a0f166d74b9
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/replay_controller.cpp
    M src/replay_controller.hpp

  Log Message:
  -----------
  refactor replay_controller

Instead of implementing its own game loop,
replay_controller now uses play_controller game loop.

This prepares a patch to use replay functionality in mp games.


  Commit: 942220da801cdcf230c38ddab177671cbc855c97
      https://github.com/wesnoth/wesnoth/commit/942220da801cdcf230c38ddab177671cbc855c97
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp
    M src/play_controller.hpp

  Log Message:
  -----------
  remove unused parameter


  Commit: fab8b9dc303d3be2ee5f1232443d0ce408e258ba
      https://github.com/wesnoth/wesnoth/commit/fab8b9dc303d3be2ee5f1232443d0ce408e258ba
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/game_initialization/playcampaign.cpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp
    M src/replay_controller.cpp
    M src/replay_controller.hpp

  Log Message:
  -----------
  dont keep [scenario]/[snapshot] config during play

the intention is to save some ram usage.


  Commit: 99c75bf9ae5af4bbb504d41efdaa725c8c9d7370
      https://github.com/wesnoth/wesnoth/commit/99c75bf9ae5af4bbb504d41efdaa725c8c9d7370
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  use scoped_ptr for gamestate_


  Commit: 20fafdee28c7f63d647f9025a946162eef0b30a0
      https://github.com/wesnoth/wesnoth/commit/20fafdee28c7f63d647f9025a946162eef0b30a0
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/CMakeLists.txt
    M src/SConscript
    M src/actions/create.cpp
    M src/actions/create.hpp
    A src/actions/unit_creator.cpp
    A src/actions/unit_creator.hpp
    M src/game_board.hpp
    M src/game_state.cpp
    M src/game_state.hpp
    M src/pathfind/pathfind.cpp
    M src/pathfind/pathfind.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp
    M src/teambuilder.cpp
    M src/teambuilder.hpp
    M src/unit.cpp
    M src/unit.hpp

  Log Message:
  -----------
  simplify game_state construction

instead of calling constructor and init you now only have to call the
constructor.

In order to make this work this commit removes the uses of
resources::gameboard/units during team construction. while doing that i
moved the unit_creator class to a new file.

This commit also removes the ticks parameter from game_startes
constructor and replaces it with a ticks() function in play_controller,
other classes were also changed to use the play_controller::ticks()
function.


  Commit: 8e875b845864f04662111f9b5c900a52ded9e324
      https://github.com/wesnoth/wesnoth/commit/8e875b845864f04662111f9b5c900a52ded9e324
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/game_state.cpp
    M src/game_state.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  move init_side_done_ to game_state class


  Commit: 941f00e49164e7bc343dcc13dce6ac3fc9f56238
      https://github.com/wesnoth/wesnoth/commit/941f00e49164e7bc343dcc13dce6ac3fc9f56238
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/game_state.cpp
    M src/game_state.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  move player_number_ to game_state


  Commit: ec8bf1e1f7415277e743dcb9e159edfc67f42335
      https://github.com/wesnoth/wesnoth/commit/ec8bf1e1f7415277e743dcb9e159edfc67f42335
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/display.cpp
    M src/display.hpp
    M src/game_display.cpp
    M src/game_display.hpp
    M src/game_state.cpp
    M src/game_state.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  move reset_gamestate function (reset_replay) to play_controller


  Commit: cdb324c9d1f2df2297e233c6fdce694ca7489d1d
      https://github.com/wesnoth/wesnoth/commit/cdb324c9d1f2df2297e233c6fdce694ca7489d1d
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/replay_controller.cpp
    M src/replay_controller.hpp

  Log Message:
  -----------
  fix wml unit tests


  Commit: 910641db40ebbe272fd06215df30bc72750b2787
      https://github.com/wesnoth/wesnoth/commit/910641db40ebbe272fd06215df30bc72750b2787
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp
    M src/replay_controller.cpp
    M src/replay_controller.hpp

  Log Message:
  -----------
  fix view beeing temporarily reset in replay viewer


  Commit: d85a711446468fa59c4afe3ba3cd17ae698afe20
      https://github.com/wesnoth/wesnoth/commit/d85a711446468fa59c4afe3ba3cd17ae698afe20
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/hotkey_handler_replay.cpp
    M src/replay_controller.cpp
    M src/replay_controller.hpp

  Log Message:
  -----------
  improve replay button state check

This changes the the function that calculates whether the
play replay button should be greyed out to always make it greyed
out if the replay is already running (not stopped).

previously it could theoretically happen that if this function was
called between two actions it wouldn't be greyed out.


  Commit: dbe107fa4bbff3b8c62e158bd2f124e4dd4455ee
      https://github.com/wesnoth/wesnoth/commit/dbe107fa4bbff3b8c62e158bd2f124e4dd4455ee
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/replay_controller.hpp

  Log Message:
  -----------
  remove undefined function


  Commit: 769d79a354b4f97b5c082dfed45d5248bbc9d7f5
      https://github.com/wesnoth/wesnoth/commit/769d79a354b4f97b5c082dfed45d5248bbc9d7f5
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/replay_controller.cpp

  Log Message:
  -----------
  simplify replay_controller::update_teams


  Commit: b97bb35de91d2eda526224c7af1bb9cdc124476b
      https://github.com/wesnoth/wesnoth/commit/b97bb35de91d2eda526224c7af1bb9cdc124476b
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  refactor play_controller::reset_gamestate


  Commit: 7b9b85cd63cd7c1d98c88a78700a88cd9a3b06b6
      https://github.com/wesnoth/wesnoth/commit/7b9b85cd63cd7c1d98c88a78700a88cd9a3b06b6
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/game_state.cpp
    M src/game_state.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp

  Log Message:
  -----------
  move loading_game_ member to game_state class


  Commit: 78755019c98e9b21ce2f53abd9760bad7e4cbb2f
      https://github.com/wesnoth/wesnoth/commit/78755019c98e9b21ce2f53abd9760bad7e4cbb2f
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/CMakeLists.txt
    M src/SConscript
    M src/controller_base.hpp
    A src/mp_replay_controller.cpp
    A src/mp_replay_controller.hpp
    M src/play_controller.hpp

  Log Message:
  -----------
  add mp_replay_controller class


  Commit: 81b6c3ab9957b25261c2ac683b49ec1e30279fb8
      https://github.com/wesnoth/wesnoth/commit/81b6c3ab9957b25261c2ac683b49ec1e30279fb8
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/hotkey_handler.cpp
    M src/hotkey_handler.hpp
    M src/hotkey_handler_sp.cpp
    M src/hotkey_handler_sp.hpp
    M src/play_controller.cpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp

  Log Message:
  -----------
  enable back to turn buttons in networked mp

When using the back to turn button in networked mp, the game now resets
the gamestate to that turn and replays the game (using the replay gui)
until the current turn.


  Commit: 02990bafbfc206aacb31d38eaffce39bf450f83a
      https://github.com/wesnoth/wesnoth/commit/02990bafbfc206aacb31d38eaffce39bf450f83a
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/game_state.cpp
    M src/game_state.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp

  Log Message:
  -----------
  fix some compiler warnings


  Commit: 47cf5acf791aed73a7065a569da071e016882c3f
      https://github.com/wesnoth/wesnoth/commit/47cf5acf791aed73a7065a569da071e016882c3f
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/tests/test_recall_list.cpp
    M src/tests/test_unit_map.cpp

  Log Message:
  -----------
  disable broken test


  Commit: 41d65f1d7505a90b985c30ea867afdafa9f4b836
      https://github.com/wesnoth/wesnoth/commit/41d65f1d7505a90b985c30ea867afdafa9f4b836
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/whiteboard/highlighter.cpp
    M src/whiteboard/highlighter.hpp
    M src/whiteboard/manager.cpp

  Log Message:
  -----------
  fix a segfault when resetting replay


  Commit: 7fc78c5586599c4f1a5b8d26585dab903685a796
      https://github.com/wesnoth/wesnoth/commit/7fc78c5586599c4f1a5b8d26585dab903685a796
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2015-09-09 (Wed, 09 Sep 2015)

  Changed paths:
    M src/CMakeLists.txt
    M src/SConscript
    M src/actions/create.cpp
    M src/actions/create.hpp
    A src/actions/unit_creator.cpp
    A src/actions/unit_creator.hpp
    M src/controller_base.hpp
    M src/display.cpp
    M src/display.hpp
    M src/game_board.hpp
    M src/game_display.cpp
    M src/game_display.hpp
    M src/game_initialization/playcampaign.cpp
    M src/game_state.cpp
    M src/game_state.hpp
    M src/hotkey_handler.cpp
    M src/hotkey_handler.hpp
    M src/hotkey_handler_replay.cpp
    M src/hotkey_handler_sp.cpp
    M src/hotkey_handler_sp.hpp
    A src/mp_replay_controller.cpp
    A src/mp_replay_controller.hpp
    M src/pathfind/pathfind.cpp
    M src/pathfind/pathfind.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playmp_controller.cpp
    M src/playmp_controller.hpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp
    M src/playturn.cpp
    M src/replay.cpp
    M src/replay_controller.cpp
    M src/replay_controller.hpp
    M src/teambuilder.cpp
    M src/teambuilder.hpp
    M src/tests/test_recall_list.cpp
    M src/tests/test_unit_map.cpp
    M src/unit.cpp
    M src/unit.hpp
    M src/whiteboard/highlighter.cpp
    M src/whiteboard/highlighter.hpp
    M src/whiteboard/manager.cpp

  Log Message:
  -----------
  Merge pull request #487 from gfgtdf/mp_replay_turn

Replay turns in networked multiplayer


Compare: https://github.com/wesnoth/wesnoth/compare/58874bdd0bec...7fc78c558659


More information about the Commits mailing list