[wesnoth-commits] [wesnoth/wesnoth] 7d9759: wb: fix moved becoming invalid after recruit is ex...

GitHub noreply at github.com
Sat May 5 12:53:37 UTC 2018


  Branch: refs/heads/1.14
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 7d97591f1dec6fb4fd05130d3175e1c06d0d0549
      https://github.com/wesnoth/wesnoth/commit/7d97591f1dec6fb4fd05130d3175e1c06d0d0549
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-05-05 (Sat, 05 May 2018)

  Changed paths:
    M src/whiteboard/action.hpp
    M src/whiteboard/mapbuilder.cpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recall.hpp
    M src/whiteboard/recruit.cpp
    M src/whiteboard/recruit.hpp

  Log Message:
  -----------
  wb: fix moved becoming invalid after recruit is executed  2

turned out 8bdccca7 was not enough because the mapbuilder erroneously
reset the units movement to full directly before it was applied. Since
the `resetters_` code in mapbuilder.cpp does not apply to
recruited/recalled units, we also have to reset the units mp in
remove_temp_modifier.


  Commit: f105da7e35c402fd20202c9f4c6c2dd3b169ab8d
      https://github.com/wesnoth/wesnoth/commit/f105da7e35c402fd20202c9f4c6c2dd3b169ab8d
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-05-05 (Sat, 05 May 2018)

  Changed paths:
    M src/units/unit.hpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recall.hpp

  Log Message:
  -----------
  wb: fix recall actions changing gamestate

The firstproblem was that:
apply_temp_modifier adds the temp_unit_ to the map, then
remove_temp_modifier adds the temp_unit_ from the map to the recall
list, which resulted in the original recall unit beeing replaced by the
temp_unit_ of the recall_action We fix that by making sure that
temp_unit_ is always the same as athe recall unti not just a copy.

The second problem was that remove_temp_modifier reset the unit mp/ap to
a value differnt form the original mp/ap which could casue OOS later
since the ap/mp might be changed form that unsynced context, we fix that
by resetting the mp/ap in remove_temp_modifier


  Commit: 17c74ddc97328f93382549d0c2a77bb21d804551
      https://github.com/wesnoth/wesnoth/commit/17c74ddc97328f93382549d0c2a77bb21d804551
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-05-05 (Sat, 05 May 2018)

  Changed paths:
    M src/recall_list_manager.cpp
    M src/recall_list_manager.hpp
    M src/whiteboard/recall.cpp
    M src/whiteboard/recall.hpp

  Log Message:
  -----------
  wb: fix rare OOS caused by recall action

previously having a planned recall action could change the order of
units in the recall list, which might for example change which unit is
recalled by a [recall].


  Commit: d08956086130809f106b769783e18375ee51498c
      https://github.com/wesnoth/wesnoth/commit/d08956086130809f106b769783e18375ee51498c
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2018-05-05 (Sat, 05 May 2018)

  Changed paths:
    M src/units/unit.hpp

  Log Message:
  -----------
  fix comment


Compare: https://github.com/wesnoth/wesnoth/compare/688edfa5eeed...d08956086130
      **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