fix bug #5831
This commit is contained in:
parent
8e434f8a78
commit
f7312159b4
1 changed files with 4 additions and 4 deletions
|
@ -920,6 +920,7 @@ void unit::read(const config& cfg)
|
|||
}
|
||||
|
||||
id_ = "";
|
||||
traits_description_ = cfg["traits_description"];
|
||||
if(cfg["type"] != "") {
|
||||
wassert(gamedata_ != NULL);
|
||||
std::map<std::string,unit_type>::const_iterator i = gamedata_->unit_types.find(cfg["type"]);
|
||||
|
@ -965,6 +966,9 @@ void unit::read(const config& cfg)
|
|||
if(cfg["ai_special"] == "guardian") {
|
||||
set_state("guardian","yes");
|
||||
}
|
||||
if(cfg["random_traits"] == "yes") {
|
||||
generate_traits();
|
||||
}
|
||||
if(cfg_["type"] == "") {
|
||||
backup_state();
|
||||
apply_modifications();
|
||||
|
@ -1033,10 +1037,6 @@ void unit::read(const config& cfg)
|
|||
movement_animations_.push_back(movement_animation(absolute_image()));
|
||||
// always have a movement animation
|
||||
}
|
||||
traits_description_ = cfg["traits_description"];
|
||||
if(cfg["random_traits"] == "yes") {
|
||||
generate_traits();
|
||||
}
|
||||
}
|
||||
void unit::write(config& cfg) const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue