diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 371985959..22dc57739 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -335,15 +335,8 @@ expandrecruit(region * r, request * recruitorders) change_level(unew, SK_AUSDAUER, i); } if (unew!=u) { - faction * f = u->faction; - unit ** up=&u->next; transfermen(unew, u, unew->number); - while (*up!=unew) up=&(*up)->next; - assert(unew->next==NULL); - *up = NULL; - if (f->units==unew) f->units = unew->nextF; - uunhash(unew); - free(unew); + destroy_unit(unew); } if (u->n < u->wants) { ADDMSG(&u->faction->msgs, msg_message("recruit", diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index e65341d11..7d4d784fd 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -166,6 +166,7 @@ destroyfaction(faction * f) set_number(u, 0); } f->alive = 0; +/* no way! f->units = NULL; */ handle_event(&f->attribs, "destroy", f); for (ff = factions; ff; ff = ff->next) { group *g;