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.
This commit is contained in:
Markus Armbruster 2008-03-15 08:24:04 +01:00
parent 38d8fd046f
commit ea43696e0d

View file

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