Land units with zero reaction radius can't go on reserve mission

This commit is contained in:
Markus Armbruster 2008-12-14 16:49:18 -05:00
parent 3a1577a6b5
commit 08bc09443d

View file

@ -172,10 +172,16 @@ mission(void)
if (!player->owner || gp->own == 0) if (!player->owner || gp->own == 0)
continue; continue;
if (mission == MI_RESERVE && !lnd_can_attack((struct lndstr *)gp)) { if (mission == MI_RESERVE) {
pr("%s is not designed to fight ground troops\n", if (!lnd_can_attack((struct lndstr *)gp)) {
obj_nameof(gp)); pr("%s is not designed to fight ground troops\n",
continue; obj_nameof(gp));
continue;
}
if (!lchr[gp->type].l_rad) {
pr("%s cannot react anywhere!\n", obj_nameof(gp));
continue;
}
} }
if ((mission == MI_INTERDICT) && (type == EF_SHIP)) if ((mission == MI_INTERDICT) && (type == EF_SHIP))