Fix broken ambush/invisibility at first turn or at unit creation.
This set hidden=true as default, you can still overwrite it with [status]hidden=no[/status] This means that all [status]hidden=yes[/status] hack previously needed can be removed. But if you want to show a new invisible unit spawn, then hidden=no is now needed.
This commit is contained in:
parent
b8808248c5
commit
e0d3333cb6
1 changed files with 3 additions and 0 deletions
|
@ -237,6 +237,7 @@ unit::unit(unit_map* unitmap, const config& cfg,
|
|||
units_(unitmap),
|
||||
invisibility_cache_()
|
||||
{
|
||||
set_state(STATE_HIDDEN,true);
|
||||
read(cfg, use_traits, state);
|
||||
/** @todo Are these modified by read? if not they can be removed. */
|
||||
getsHit_=0;
|
||||
|
@ -315,6 +316,7 @@ unit::unit(const config& cfg,bool use_traits) :
|
|||
units_(NULL),
|
||||
invisibility_cache_()
|
||||
{
|
||||
set_state(STATE_HIDDEN,true);
|
||||
read(cfg,use_traits);
|
||||
/** @todo Are these modified by read? if not they can be removed. */
|
||||
getsHit_=0;
|
||||
|
@ -443,6 +445,7 @@ unit::unit(unit_map *unitmap, const unit_type *t, int side,
|
|||
getsHit_=0;
|
||||
end_turn_ = false;
|
||||
hold_position_ = false;
|
||||
set_state(STATE_HIDDEN,true);
|
||||
next_idling_ = 0;
|
||||
frame_begin_time_ = 0;
|
||||
unit_halo_ = halo::NO_HALO;
|
||||
|
|
Loading…
Add table
Reference in a new issue