forked from github/server
FOLGE SCHIFF gibt massenhaft Fehlermeldungen.
This commit is contained in:
parent
bee21c7597
commit
2fe73a38f7
|
@ -218,9 +218,6 @@
|
|||
<File
|
||||
RelativePath=".\message.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\monster.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\movement.h">
|
||||
</File>
|
||||
|
|
|
@ -2130,21 +2130,20 @@ move_hunters(void)
|
|||
region *r;
|
||||
|
||||
for (r = regions; r; r = r->next) {
|
||||
unit * u;
|
||||
for (u = r->units; u;) {
|
||||
unit *u2 = u->next;
|
||||
unit ** up = &r->units, * u;
|
||||
for (u=r->units; u; u=u->next) freset(u, FL_DH);
|
||||
|
||||
while (*up!=NULL) {
|
||||
unit * u = *up;
|
||||
|
||||
if (!fval(u, FL_DH)) {
|
||||
order * ord;
|
||||
param_t p;
|
||||
|
||||
fset(u, FL_DH);
|
||||
|
||||
for (ord=u->orders;ord;ord=ord->next) {
|
||||
if (get_keyword(ord) == K_FOLLOW) {
|
||||
if (attacked(u)) {
|
||||
cmistake(u, ord, 52, MSG_MOVE);
|
||||
break;
|
||||
} else if (!can_move(u)) {
|
||||
cmistake(u, ord, 55, MSG_MOVE);
|
||||
break;
|
||||
}
|
||||
param_t p;
|
||||
|
||||
init_tokens(ord);
|
||||
skip_token();
|
||||
|
@ -2156,13 +2155,24 @@ move_hunters(void)
|
|||
break;
|
||||
}
|
||||
|
||||
/* wir folgen definitiv einem Schiff. */
|
||||
|
||||
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)) {
|
||||
u2 = r->units;
|
||||
up = &r->units;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
u = u2;
|
||||
}
|
||||
if (*up==u) up=&u->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue