forked from github/server
- Gewichtsberechnung für TRANSPORTIERE
This commit is contained in:
parent
c33cd598b5
commit
2f7ef14898
|
@ -994,19 +994,18 @@ init_transportation(void)
|
||||||
|
|
||||||
for (ord = u->orders; ord; ord = ord->next) {
|
for (ord = u->orders; ord; ord = ord->next) {
|
||||||
if (get_keyword(ord) == K_TRANSPORT) {
|
if (get_keyword(ord) == K_TRANSPORT) {
|
||||||
unit * ut;
|
|
||||||
|
|
||||||
init_tokens(ord);
|
init_tokens(ord);
|
||||||
skip_token();
|
skip_token();
|
||||||
ut = getunit(r, u->faction);
|
for (;;) {
|
||||||
if (ut == NULL) continue;
|
unit * ut = getunit(r, u->faction);
|
||||||
|
|
||||||
if (get_keyword(ut->thisorder) == K_DRIVE && can_move(u) && !fval(ut, UFL_LONGACTION) && !LongHunger(ut)) {
|
if (ut == NULL) break;
|
||||||
|
if (get_keyword(ut->thisorder) == K_DRIVE && can_move(ut) && !fval(ut, UFL_LONGACTION) && !LongHunger(ut)) {
|
||||||
init_tokens(ut->thisorder);
|
init_tokens(ut->thisorder);
|
||||||
skip_token();
|
skip_token();
|
||||||
if (getunit(r, ut->faction) == u) {
|
if (getunit(r, ut->faction) == u) {
|
||||||
w += weight(ut);
|
w += weight(ut);
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue