forked from github/server
use monster_attack, not explicit create_order, because we need to check buildings, etc.
This commit is contained in:
parent
defd870cd1
commit
4b7b32cbb5
1 changed files with 4 additions and 2 deletions
|
@ -797,8 +797,10 @@ void plan_monsters(faction * f)
|
|||
if (ta && !monster_is_waiting(u)) {
|
||||
unit *tu = (unit *)ta->data.v;
|
||||
if (tu && tu->region == r) {
|
||||
addlist(&u->orders,
|
||||
create_order(K_ATTACK, u->faction->locale, "%i", tu->no));
|
||||
order * ord = monster_attack(u, tu);
|
||||
if (ord) {
|
||||
addlist(&u->orders, ord);
|
||||
}
|
||||
}
|
||||
else if (tu) {
|
||||
tu = findunitg(ta->data.i, NULL);
|
||||
|
|
Loading…
Reference in a new issue