From ea43696e0d1c9a31ea710f81c736f64694f3fa53 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 15 Mar 2008 08:24:04 +0100 Subject: [PATCH] Clean up fire command's enum targ_type You can't fire at land units. target is never set to targ_unit, only compared to it. Remove. --- src/lib/commands/mfir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/commands/mfir.c b/src/lib/commands/mfir.c index 10a0bd9c0..3389d79bc 100644 --- a/src/lib/commands/mfir.c +++ b/src/lib/commands/mfir.c @@ -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; -- 2.43.0