Fix: it wasn't possible to remove invulnerability with the shorthand
The command ";unit invulnerable=false" didn't do anything to an invulnerable unit.
This commit is contained in:
parent
8bd632f18c
commit
c438a2a21a
1 changed files with 2 additions and 2 deletions
|
@ -564,9 +564,9 @@ unit::unit(const config &cfg, bool use_traits, const vconfig* vcfg)
|
|||
hit_points_ = max_hit_points_;
|
||||
}
|
||||
|
||||
if (cfg["invulnerable"].to_bool(false) == true)
|
||||
if (const config::attribute_value *v = cfg.get("invulnerable"))
|
||||
{
|
||||
set_state("invulnerable", true);
|
||||
set_state("invulnerable", v->to_bool());
|
||||
}
|
||||
|
||||
goto_.x = cfg["goto_x"].to_int() - 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue