Fix part of dark forecast's errors,

...remove mp_side attributes as well as side attributes before passing
the cfg to unit_creator
This commit is contained in:
Alexander van Gessel 2010-01-27 16:47:18 +01:00
parent 4611b1b095
commit 9341377e22
2 changed files with 8 additions and 1 deletions

View file

@ -70,7 +70,7 @@ Note: You need to use map settings for the scenario to work right."
{VARIABLE spawns[$id].side $timid_ai_side}
{VARIABLE spawns[$id].generate_name yes}
{VARIABLE spawns[$id].slowed yes}
{VARIABLE spawns[$id].status.slowed yes}
{CLEAR_VARIABLE spawns[$id].name}
[unstore_unit]

View file

@ -914,6 +914,10 @@ protected:
"persistent", "share_view",
"share_maps", "recruit", "fog", "shroud", "shroud_data" };
static char const *mp_side_attrs[] = {
"income_lock", "gold_lock", "team_lock", "leader",
"random_leader", "terrain_liked" };
log_step("place units");
foreach (const config *u, unit_configs_) {
unit_creator uc(*t_,map_.starting_position(side_));
@ -929,6 +933,9 @@ protected:
foreach (const char *attr, side_attrs) {
cfg.remove_attribute(attr);
}
foreach (const char *attr, mp_side_attrs) {
cfg.remove_attribute(attr);
}
uc.add_unit(cfg);
}