diff --git a/src/lib/commands/carg.c b/src/lib/commands/carg.c index 25b01b40..043e9b32 100644 --- a/src/lib/commands/carg.c +++ b/src/lib/commands/carg.c @@ -56,10 +56,6 @@ carg(void) continue; if ((player->cnum != ship.shp_own) && !player->god) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, ni.cur); - continue; - } if (nships++ == 0) pr("shp# ship type x,y flt eff sh gun pet irn dst bar oil lcm hcm rad\n"); pr("%4d ", ni.cur); @@ -106,10 +102,6 @@ lcarg(void) continue; if ((player->cnum != land.lnd_own) && !player->god) continue; - if (land.lnd_type < 0 || land.lnd_type > lnd_maxno) { - pr("bad unit type %d (#%d)\n", land.lnd_type, ni.cur); - continue; - } if (nunits++ == 0) pr("lnd# unit type x,y a eff sh gun pet irn dst bar oil lcm hcm rad\n"); pr("%4d ", ni.cur); diff --git a/src/lib/commands/fort.c b/src/lib/commands/fort.c index 433b4ba8..6db2d2dc 100644 --- a/src/lib/commands/fort.c +++ b/src/lib/commands/fort.c @@ -62,11 +62,6 @@ fort(void) while (nxtitem(&ni, &land)) { if (!player->owner || land.lnd_own == 0) continue; - if (land.lnd_type < 0 || land.lnd_type > lnd_maxno) { - pr("bad unit type %d (#%d)\n", land.lnd_type, ni.cur); - continue; - } - getland(land.lnd_uid, &land); if (land.lnd_mobil < 0) continue; diff --git a/src/lib/commands/land.c b/src/lib/commands/land.c index 5469c3ca..8907e0b6 100644 --- a/src/lib/commands/land.c +++ b/src/lib/commands/land.c @@ -56,10 +56,6 @@ land(void) continue; if (!player->owner && !player->god) continue; - if (land.lnd_type < 0 || land.lnd_type > lnd_maxno) { - pr("bad unit type %d (#%d)\n", land.lnd_type, ni.cur); - continue; - } count_land_planes(&land); lnd_count_units(&land); diff --git a/src/lib/commands/ldump.c b/src/lib/commands/ldump.c index 61466920..78288ee0 100644 --- a/src/lib/commands/ldump.c +++ b/src/lib/commands/ldump.c @@ -294,10 +294,6 @@ ldump(void) continue; if (!player->owner && !player->god) continue; - if (land.lnd_type < 0 || land.lnd_type > lnd_maxno) { - pr("bad unit type %d (#%d)\n", land.lnd_type, ni.cur); - continue; - } count_land_planes(&land); lnd_count_units(&land); diff --git a/src/lib/commands/lstat.c b/src/lib/commands/lstat.c index b18c6630..5a0ff3e6 100644 --- a/src/lib/commands/lstat.c +++ b/src/lib/commands/lstat.c @@ -52,10 +52,6 @@ lsta(void) while (nxtitem(&ni, &land)) { if (!player->owner || land.lnd_own == 0) continue; - if (land.lnd_type < 0 || land.lnd_type > lnd_maxno) { - pr("bad unit type %d (#%d)\n", land.lnd_type, ni.cur); - continue; - } count_land_planes(&land); if (nunits++ == 0) { diff --git a/src/lib/commands/orde.c b/src/lib/commands/orde.c index c2127362..fc980e60 100644 --- a/src/lib/commands/orde.c +++ b/src/lib/commands/orde.c @@ -86,10 +86,6 @@ orde(void) while (!player->aborted && nxtitem(&nb, (&ship))) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, nb.cur); - continue; - } if (opt_SAIL) { if (*ship.shp_path) { if (!diffeachship) diff --git a/src/lib/commands/payo.c b/src/lib/commands/payo.c index b73a16b3..511472f4 100644 --- a/src/lib/commands/payo.c +++ b/src/lib/commands/payo.c @@ -64,10 +64,6 @@ payo(void) while (nxtitem(&ni, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, ni.cur); - continue; - } mp = &mchr[(int)ship.shp_type]; if (!(mp->m_flags & M_TRADE)) diff --git a/src/lib/commands/retr.c b/src/lib/commands/retr.c index e6837393..4206ab8e 100644 --- a/src/lib/commands/retr.c +++ b/src/lib/commands/retr.c @@ -137,10 +137,6 @@ retr(void) while (nxtitem(&ni, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, ni.cur); - continue; - } if (zero) memset(ship.shp_rpath, 0, sizeof(ship.shp_rpath)); @@ -268,10 +264,6 @@ lretr(void) while (nxtitem(&ni, &land)) { if (!player->owner || land.lnd_own == 0) continue; - if (land.lnd_type < 0 || land.lnd_type > lnd_maxno) { - pr("bad unit type %d (#%d)\n", land.lnd_type, ni.cur); - continue; - } if (zero) memset(land.lnd_rpath, 0, sizeof(land.lnd_rpath)); diff --git a/src/lib/commands/sail.c b/src/lib/commands/sail.c index 4d633827..ce95ab5d 100644 --- a/src/lib/commands/sail.c +++ b/src/lib/commands/sail.c @@ -51,10 +51,6 @@ show_sail(struct nstr_item *nstr) while (nxtitem(nstr, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, nstr->cur); - continue; - } if (count++ == 0) { if (player->god) pr("own "); @@ -101,10 +97,6 @@ cmd_unsail_ship(struct nstr_item *nstr) while (nxtitem(nstr, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, nstr->cur); - continue; - } if (ship.shp_path[0]) { pr("Ship #%d unsailed\n", ship.shp_uid); count++; @@ -125,10 +117,6 @@ cmd_sail_ship(struct nstr_item *nstr) while (!player->aborted && nxtitem(nstr, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, nstr->cur); - continue; - } if ((ship.shp_autonav & AN_AUTONAV) && !(ship.shp_autonav & AN_STANDBY)) { pr("Ship #%d has other orders!\n", ship.shp_uid); diff --git a/src/lib/commands/sdump.c b/src/lib/commands/sdump.c index 56ac3647..6051b490 100644 --- a/src/lib/commands/sdump.c +++ b/src/lib/commands/sdump.c @@ -267,10 +267,6 @@ sdump(void) while (nxtitem(&ni, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, ni.cur); - continue; - } count_planes(&ship); count_units(&ship); nships++; diff --git a/src/lib/commands/shi.c b/src/lib/commands/shi.c index 505a34b4..c99bca3e 100644 --- a/src/lib/commands/shi.c +++ b/src/lib/commands/shi.c @@ -55,10 +55,6 @@ shi(void) while (nxtitem(&ni, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, ni.cur); - continue; - } count_planes(&ship); count_units(&ship); if (nships++ == 0) { diff --git a/src/lib/commands/sstat.c b/src/lib/commands/sstat.c index 48343ab6..1433e86c 100644 --- a/src/lib/commands/sstat.c +++ b/src/lib/commands/sstat.c @@ -52,10 +52,6 @@ sstat(void) while (nxtitem(&ni, &ship)) { if (!player->owner || ship.shp_own == 0) continue; - if (ship.shp_type < 0 || ship.shp_type > shp_maxno) { - pr("bad ship type %d (#%d)\n", ship.shp_type, ni.cur); - continue; - } count_planes(&ship); count_units(&ship); diff --git a/src/lib/commands/work.c b/src/lib/commands/work.c index 0fa4d57b..de327c59 100644 --- a/src/lib/commands/work.c +++ b/src/lib/commands/work.c @@ -70,10 +70,6 @@ work(void) while (nxtitem(&ni, &land)) { if (!player->owner || land.lnd_own == 0) continue; - if (land.lnd_type < 0 || land.lnd_type > lnd_maxno) { - pr("bad unit type %d (#%d)\n", land.lnd_type, ni.cur); - continue; - } if (!(lchr[(int)land.lnd_type].l_flags & L_ENGINEER)) continue; if (land.lnd_mobil <= 0) {