Skip to content

Commit

Permalink
Fix merging of default facets with composite values
Browse files Browse the repository at this point in the history
Now the last [value] tag wins.
  • Loading branch information
CelticMinstrel authored and mattsc committed Mar 22, 2016
1 parent cb0fad0 commit 895a326
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ai/configuration.cpp
Expand Up @@ -228,6 +228,12 @@ bool configuration::parse_side_config(side_number side, const config& original_c
continue;
}
aspect_cfg.merge_children("default");
config& dflt = aspect_cfg.child("default");
if (dflt.has_child("value")) {
while (dflt.child_count("value") > 1) {
dflt.remove_child("value", 0);
}
}
}

DBG_AI_CONFIGURATION << "side "<< side <<": done parsing side config, it contains:"<< std::endl << parsed_cfg << std::endl;
Expand Down

0 comments on commit 895a326

Please sign in to comment.