FOLGE SCHIFF gibt massenhaft Fehlermeldungen.
This commit is contained in:
Enno Rehling 2004-06-30 21:29:17 +00:00
parent bee21c7597
commit 2fe73a38f7
2 changed files with 36 additions and 29 deletions

View File

@ -218,9 +218,6 @@
<File <File
RelativePath=".\message.h"> RelativePath=".\message.h">
</File> </File>
<File
RelativePath=".\monster.h">
</File>
<File <File
RelativePath=".\movement.h"> RelativePath=".\movement.h">
</File> </File>

View File

@ -2130,39 +2130,49 @@ move_hunters(void)
region *r; region *r;
for (r = regions; r; r = r->next) { for (r = regions; r; r = r->next) {
unit * u; unit ** up = &r->units, * u;
for (u = r->units; u;) { for (u=r->units; u; u=u->next) freset(u, FL_DH);
unit *u2 = u->next;
order * ord;
param_t p;
for (ord=u->orders;ord;ord=ord->next) { while (*up!=NULL) {
if (get_keyword(ord) == K_FOLLOW) { unit * u = *up;
if (attacked(u)) {
cmistake(u, ord, 52, MSG_MOVE);
break;
} else if (!can_move(u)) {
cmistake(u, ord, 55, MSG_MOVE);
break;
}
init_tokens(ord); if (!fval(u, FL_DH)) {
skip_token(); order * ord;
p = getparam(u->faction->locale);
if (p != P_SHIP) { fset(u, FL_DH);
if (p != P_UNIT) {
cmistake(u, ord, 240, MSG_MOVE); for (ord=u->orders;ord;ord=ord->next) {
if (get_keyword(ord) == K_FOLLOW) {
param_t p;
init_tokens(ord);
skip_token();
p = getparam(u->faction->locale);
if (p != P_SHIP) {
if (p != P_UNIT) {
cmistake(u, ord, 240, MSG_MOVE);
}
break;
} }
break;
}
if (!fval(u, UFL_LONGACTION) && !fval(u, UFL_HUNGER) && hunt(u)) { /* wir folgen definitiv einem Schiff. */
u2 = r->units;
break; if (fval(u, UFL_LONGACTION)) {
cmistake(u, ord, 52, MSG_MOVE);
break;
} else if (!can_move(u)) {
cmistake(u, ord, 55, MSG_MOVE);
break;
}
if (!fval(u, UFL_LONGACTION) && !fval(u, UFL_HUNGER) && hunt(u)) {
up = &r->units;
break;
}
} }
} }
} }
u = u2; if (*up==u) up=&u->next;
} }
} }
} }