forked from github/server
"Falsche Regionsbeschreibung" - removing descriptions from non-land regions.
This commit is contained in:
parent
86f89be914
commit
16c3b68114
2 changed files with 7 additions and 0 deletions
|
@ -969,6 +969,8 @@ terraform_region(region * r, const terrain_type * terrain)
|
|||
terraform_resources(r);
|
||||
|
||||
if (!fval(terrain, LAND_REGION)) {
|
||||
free(r->display);
|
||||
r->display = NULL;
|
||||
if (r->land!=NULL) {
|
||||
i_freeall(&r->land->items);
|
||||
freeland(r->land);
|
||||
|
|
|
@ -964,6 +964,11 @@ fix_groups(void)
|
|||
for (r=regions;r!=NULL;r=r->next) {
|
||||
unit * u;
|
||||
|
||||
if (r->display && !fval(r->terrain, LAND_REGION)) {
|
||||
free(r->display);
|
||||
r->display = NULL;
|
||||
}
|
||||
|
||||
for (u=r->units;u;u=u->next) {
|
||||
if (fval(u, UFL_GROUP)) {
|
||||
attrib * a = a_find(u->attribs, &at_group);
|
||||
|
|
Loading…
Reference in a new issue