[Commits] [wesnoth/wesnoth] 9d096b: remove strange playmp_controller_.stop_network() c...

GitHub noreply at github.com
Sun Mar 1 03:16:41 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 9d096bef24a5a8cb30f1d556dadcc8e5054d1bff
      https://github.com/wesnoth/wesnoth/commit/9d096bef24a5a8cb30f1d556dadcc8e5054d1bff
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

  Changed paths:
    M src/hotkey_handler_mp.cpp

  Log Message:
  -----------
  remove strange playmp_controller_.stop_network() call

can_execute_command should just check whether a command can be executed.
Idk why we called playmp_controller_.stop_network(); there.


  Commit: 8b83504b5bcba8d3895444c71e84b443a6bd95c2
      https://github.com/wesnoth/wesnoth/commit/8b83504b5bcba8d3895444c71e84b443a6bd95c2
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

  Changed paths:
    M src/actions/heal.cpp
    M src/game_events/action_wml.cpp
    M src/play_controller.cpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/playturn.cpp
    M src/playturn.hpp
    M src/replay.cpp
    M src/replay.hpp
    M src/replay_controller.cpp

  Log Message:
  -----------
  remove field replay::skip_

We have the information already in play_controller_skip_replay_


  Commit: 180acb077cc220a43b5f19473e2d8b9fab054973
      https://github.com/wesnoth/wesnoth/commit/180acb077cc220a43b5f19473e2d8b9fab054973
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

  Changed paths:
    M src/game_initialization/playcampaign.cpp

  Log Message:
  -----------
  don't do auto delete save on defeat in mp campaigns

We now use 'end_level.proceed_to_next_level' instead of 'res == VICTORY
|| (game_type == game_classification::MULTIPLAYER && res == DEFEAT'  to
decide whether we do auto save deletion. The intention is to adress 'if
MP campaigns ever work again, we might need to change this test'
as it was commented in the code

We also refactor playsingle/mp_scenario to not do
playcontroller.update_savegame_snapshot(); if res == DEFEAT since it is
not neeeded in this case.


  Commit: 107da1f240a4c9d55382a52ce5936771bc7b7cac
      https://github.com/wesnoth/wesnoth/commit/107da1f240a4c9d55382a52ce5936771bc7b7cac
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

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

  Log Message:
  -----------
  refactor play_controller::fire_start

We remove a try/ctach for an exception that cannot be thrown.
We move the random mode wanring out of fire_start()
Also we use gui2::show_transient_message instead of
replay::process_error becasue the error is no OOS.


  Commit: 560a4c9d72f6807d6fea8fe45e470e5ea2a52baa
      https://github.com/wesnoth/wesnoth/commit/560a4c9d72f6807d6fea8fe45e470e5ea2a52baa
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

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

  Log Message:
  -----------
  remove 'past_prestart' variable


  Commit: bf373658e5720616371dddd41608642b9f99b79a
      https://github.com/wesnoth/wesnoth/commit/bf373658e5720616371dddd41608642b9f99b79a
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

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

  Log Message:
  -----------
  store it_is_a_new_turn_ in savefiles

this is intended to fix a case where turn X events are not fired when
reloading init_side_done=no saves when it is the first players turn.


  Commit: 5ac4fbae91ca9b5d168c3d8e86b3ba761577639a
      https://github.com/wesnoth/wesnoth/commit/5ac4fbae91ca9b5d168c3d8e86b3ba761577639a
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

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

  Log Message:
  -----------
  refactor play_controller::fire_start


  Commit: 30e670f5a8babd17fa5647d1ef12176a04be44de
      https://github.com/wesnoth/wesnoth/commit/30e670f5a8babd17fa5647d1ef12176a04be44de
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

  Changed paths:
    M src/game_end_exceptions.cpp
    M src/game_end_exceptions.hpp
    M src/game_initialization/playcampaign.cpp
    M src/game_launcher.cpp
    M src/hotkey/command_executor.cpp
    M src/menu_events.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/playturn.cpp
    M src/replay_controller.cpp
    M src/replay_controller.hpp
    M src/savegame.cpp
    M src/scripting/game_lua_kernel.cpp

  Log Message:
  -----------
  refactor end_level_data, end_level_exception and LEVEL_RESULT

I removed the NONE value of LEVEL_RESULT because 'LEVEL_RESULT==NONE'
was basicly the same information as '!end_level_data.transient.disabled'

I removed end_level_data.transient.disabled and instead store the end
level_data as an optional<end_level_data> to remember whether we already
have an end_level_data

I removed the SKIP_TO_LINGER value of LEVEL_RESULT because it was not
possible that play_scenario returned SKIP_TO_LINGER (so i removed that
code in playcampaign.cpp that handled this case)

I replaced playsingle_controller::level_result_ and
end_level_exception/struct::result which both held more or less the same
data with end_level_data::is_vitory, in case of QUIT the
optional<end_level_data> is empty (none_t)

I also reordered the if cases in playsingle_controller::play_scenario to
simplify.


  Commit: f8b4741b8d617e721a5db13709df041f226bbb81
      https://github.com/wesnoth/wesnoth/commit/f8b4741b8d617e721a5db13709df041f226bbb81
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

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

  Log Message:
  -----------
  remove unneeded send_data call


  Commit: b60809e623d89d3667009330cf50e9b96e0aeb0d
      https://github.com/wesnoth/wesnoth/commit/b60809e623d89d3667009330cf50e9b96e0aeb0d
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2015-03-01 (Sun, 01 Mar 2015)

  Changed paths:
    M src/ai/actions.cpp
    M src/ai/manager.cpp
    M src/game_end_exceptions.hpp
    M src/menu_events.cpp
    M src/mouse_events.cpp
    M src/playmp_controller.cpp
    M src/playsingle_controller.cpp
    M src/playsingle_controller.hpp
    M src/replay_controller.cpp
    M src/whiteboard/move.cpp
    M src/whiteboard/side_actions.cpp

  Log Message:
  -----------
  don't throw exceptions on :droid, :idle

This not only simplifies the playsingle/mp_controller code, it also
fixes a bug that actions were aborted when issueing a :droid during an
ai turn causing corrupt replays or worse.

We still use restart_turn_exception to escape insode the ai code but not
during the action. Instead we now check player_type_changed_ after every
action, just like we do for ai_end_turn_exception and catch it inside
ai::manager::play_turn so that the playsingle/mp_controller code doesn't
have to handle this exception anymore.


Compare: https://github.com/wesnoth/wesnoth/compare/9e8645a068e7...b60809e623d8


More information about the Commits mailing list