From daafe05c47ec47646ad3d78d800e22041f5cba78 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 29 Jul 2006 14:15:42 +0000 Subject: [PATCH] count_unit(u) bestimmt, welche einheiten zum partei-limit gezaehlt werden. Das sollten alle sein, sind's aber vorlaeufig nicht. ausserdem ein bischen code-cleanup. third commit for this, shit didn't go right. --- src/common/kernel/unit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index 8faeb91e5..1c9ecf2b5 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -904,7 +904,7 @@ u_setfaction(unit * u, faction * f) if (u->faction) { unit ** iunit; set_number(u, 0); - --u->faction->no_units; + if (count_unit(u)) --u->faction->no_units; join_group(u, NULL); free_orders(&u->orders); set_order(&u->thisorder, NULL); @@ -930,7 +930,7 @@ u_setfaction(unit * u, faction * f) if (u->region) update_interval(f, u->region); if (cnt && f) { set_number(u, cnt); - ++f->no_units; + if (count_unit(u)) ++f->no_units; } }