forked from github/server
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.
This commit is contained in:
parent
594e75e42f
commit
daafe05c47
|
@ -904,7 +904,7 @@ u_setfaction(unit * u, faction * f)
|
||||||
if (u->faction) {
|
if (u->faction) {
|
||||||
unit ** iunit;
|
unit ** iunit;
|
||||||
set_number(u, 0);
|
set_number(u, 0);
|
||||||
--u->faction->no_units;
|
if (count_unit(u)) --u->faction->no_units;
|
||||||
join_group(u, NULL);
|
join_group(u, NULL);
|
||||||
free_orders(&u->orders);
|
free_orders(&u->orders);
|
||||||
set_order(&u->thisorder, NULL);
|
set_order(&u->thisorder, NULL);
|
||||||
|
@ -930,7 +930,7 @@ u_setfaction(unit * u, faction * f)
|
||||||
if (u->region) update_interval(f, u->region);
|
if (u->region) update_interval(f, u->region);
|
||||||
if (cnt && f) {
|
if (cnt && f) {
|
||||||
set_number(u, cnt);
|
set_number(u, cnt);
|
||||||
++f->no_units;
|
if (count_unit(u)) ++f->no_units;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue