- Gewichtsberechnung für TRANSPORTIERE
This commit is contained in:
Enno Rehling 2006-04-09 10:55:41 +00:00
parent c33cd598b5
commit 2f7ef14898
1 changed files with 9 additions and 10 deletions

View File

@ -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;
init_tokens(ut->thisorder); if (get_keyword(ut->thisorder) == K_DRIVE && can_move(ut) && !fval(ut, UFL_LONGACTION) && !LongHunger(ut)) {
skip_token(); init_tokens(ut->thisorder);
if (getunit(r, ut->faction) == u) { skip_token();
w += weight(ut); if (getunit(r, ut->faction) == u) {
break; w += weight(ut);
}
} }
} }
} }