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)) {
|
if (ta && !monster_is_waiting(u)) {
|
||||||
unit *tu = (unit *)ta->data.v;
|
unit *tu = (unit *)ta->data.v;
|
||||||
if (tu && tu->region == r) {
|
if (tu && tu->region == r) {
|
||||||
addlist(&u->orders,
|
order * ord = monster_attack(u, tu);
|
||||||
create_order(K_ATTACK, u->faction->locale, "%i", tu->no));
|
if (ord) {
|
||||||
|
addlist(&u->orders, ord);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (tu) {
|
else if (tu) {
|
||||||
tu = findunitg(ta->data.i, NULL);
|
tu = findunitg(ta->data.i, NULL);
|
||||||
|
|
Loading…
Reference in a new issue