[Commits] [wesnoth/wesnoth] 62ec3b: Better tracking whether the unit was changed durin...

GitHub noreply at github.com
Tue Aug 1 21:20:11 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 62ec3b3951bfb7bf6331ad1e98f45ce99e5191d5
      https://github.com/wesnoth/wesnoth/commit/62ec3b3951bfb7bf6331ad1e98f45ce99e5191d5
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2017-08-01 (Tue, 01 Aug 2017)

  Changed paths:
    M src/actions/move.cpp
    M src/units/unit.cpp
    M src/units/unit.hpp

  Log Message:
  -----------
  Better tracking whether the unit was changed during movement.

Fixes #1565

Previosuly the anitmators fake unit was reset whenever any wml/lua was executed
causing animations issues ( #1565 ). Now we only reset it when the unit
appearance  was actually changed by wml.

appearance_changed_ is mutable because set_hidden() is const.
appearance_changed_ is initially true so that the code updates the unit in
case that the unit was completeley reset ( [unstore_unit] etc.)

EDIT: set_hidden() doesn't set appearance_changed_ anymore becasue it's also
called by the movement animation code which made appearance_changed_ always
true when we checked it at move.cpp





More information about the Commits mailing list