[wesnoth-commits] [wesnoth/wesnoth] 55065e: fix [on_undo] in menu items and custom_command

GitHub noreply at github.com
Mon Apr 30 17:43:07 UTC 2018


  Branch: refs/heads/1.14
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 55065e10d4af2f7e617cd09736c49a73c5d5facf
      https://github.com/wesnoth/wesnoth/commit/55065e10d4af2f7e617cd09736c49a73c5d5facf
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-04-30 (Mon, 30 Apr 2018)

  Changed paths:
    M src/actions/undo.cpp
    M src/actions/undo_action.hpp
    M src/synced_commands.cpp

  Log Message:
  -----------
  fix [on_undo] in menu items and custom_command

also fixes menu items beeing marked as undoabel even if they used the
synced rng.


  Commit: edb4d2cf048c42495bcef6d13d724f12e6749f28
      https://github.com/wesnoth/wesnoth/commit/edb4d2cf048c42495bcef6d13d724f12e6749f28
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-04-30 (Mon, 30 Apr 2018)

  Changed paths:
    M src/fake_unit_ptr.cpp
    M src/fake_unit_ptr.hpp
    M src/whiteboard/attack.cpp
    M src/whiteboard/manager.cpp
    M src/whiteboard/move.cpp
    M src/whiteboard/side_actions.cpp

  Log Message:
  -----------
  wb: fix future unit sprite missing

fixes #2124


  Commit: 1f2f46b27acc8abc326aba692eeef53619d08b61
      https://github.com/wesnoth/wesnoth/commit/1f2f46b27acc8abc326aba692eeef53619d08b61
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-04-30 (Mon, 30 Apr 2018)

  Changed paths:
    M src/whiteboard/side_actions.cpp

  Log Message:
  -----------
  wb: more robust side_actions_container::get_turn

the assumption

(turn_beginnings_[num] == it) => (get_turn(it) == num)

might be wrong in case that we have a turn with no actions, in which
case turn_beginnings_ contains duplicates and we actually want the upper
bound of (x <= it) in turn_beginnings_


  Commit: fd5fdd8ebb70526095b1d2d01b874b124bcbbcfc
      https://github.com/wesnoth/wesnoth/commit/fd5fdd8ebb70526095b1d2d01b874b124bcbbcfc
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-04-30 (Mon, 30 Apr 2018)

  Changed paths:
    M src/whiteboard/side_actions.cpp

  Log Message:
  -----------
  wb: more robust side_actions_container::erase

i don't really know why the old code had a special case for
`get_turn(next) != turn_of_position`, from what i see `turn_end(0)`
would basicially return the same value as `next`. The new code removes
that special case which resulted in assertion failures before (#1841)
and also consiers the case where `position` appears multiple times in
`turn_beginnings_`


Compare: https://github.com/wesnoth/wesnoth/compare/fd370f5b9563...fd5fdd8ebb70


More information about the Commits mailing list