]> git.pond.sub.org Git - empserver/commitdiff
Land units with zero reaction radius can't go on reserve mission
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Dec 2008 21:49:18 +0000 (16:49 -0500)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 25 Dec 2008 10:47:33 +0000 (11:47 +0100)
src/lib/commands/miss.c

index ab403878bbac942b69bd39789349cee71f16e04b..586eb6054c6e38a2979844916b0ee96c6329d525 100644 (file)
@@ -172,10 +172,16 @@ mission(void)
        if (!player->owner || gp->own == 0)
            continue;
 
-       if (mission == MI_RESERVE && !lnd_can_attack((struct lndstr *)gp)) {
-           pr("%s is not designed to fight ground troops\n",
-              obj_nameof(gp));
-           continue;
+       if (mission == MI_RESERVE) {
+           if (!lnd_can_attack((struct lndstr *)gp)) {
+               pr("%s is not designed to fight ground troops\n",
+                  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))