]> git.pond.sub.org Git - empserver/commitdiff
Clean up fire command's enum targ_type
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 15 Mar 2008 07:24:04 +0000 (08:24 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 17 Mar 2008 18:08:34 +0000 (19:08 +0100)
You can't fire at land units.  target is never set to targ_unit, only
compared to it.  Remove.

src/lib/commands/mfir.c

index 10a0bd9c0c6be89eb3f7fdda7f514a993834bcbc..3389d79bc1a58955005e3295b80d9d57c3634279 100644 (file)
@@ -39,7 +39,7 @@
 #include "retreat.h"
 
 enum targ_type {
-    targ_land, targ_ship, targ_sub, targ_unit, targ_bogus
+    targ_land, targ_ship, targ_sub, targ_bogus
 };
 
 struct flist {
@@ -422,7 +422,6 @@ multifire(void)
            if (!trechk(player->cnum, vict, SUBFIR))
                continue;
            break;
-       case targ_unit:
        case targ_land:
            if (!trechk(player->cnum, vict, LANFIR))
                continue;
@@ -474,7 +473,6 @@ multifire(void)
                   player->cnum, xyas(x, y, vict), dam);
            pr("Shells hit sector %s for %d damage.\n",
               xyas(x, y, player->cnum), dam);
-           /* Ok, it wasn't a bogus target, so do damage. */
            if (target != targ_bogus)
                sectdamage(&vsect, dam, 0);
            break;