Follow-up Comment #2, patch #1668 (project wesnoth):
Current version saves only 'true' unit attributes:
[status]
hidden="yes"
not_living="yes"
[/status]
And default value for attributes is 'false'. But, in unit::unit constructor
we have
set_state(STATE_HIDDEN,true);
statement. And because of this when we restoring savegame our visible unit
becomes invisible.
So, we need to say implicitly(e.g., store in savegame) that our unit should
be visible(for example if it killed someone but now have no enemy near) this
turn. And i decided to store all attributes just like:
[status]
hidden="no"
not_living="yes"
not_moved="no"
petrified="no"
poisoned="no"
slowed="no"
unhealable="no"
[/status]
To do that i changed
unit::unit(const config &cfg, bool use_traits, game_state* state)
and
const std::map<std::string,std::string> unit::get_states() const
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1668>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs