diff --git a/include/land.h b/include/land.h index bb25c811..48742630 100644 --- a/include/land.h +++ b/include/land.h @@ -180,7 +180,6 @@ extern void lnd_submil(struct lndstr *, int); extern void lnd_takemob(struct emp_qelem *, double); extern int lnd_spyval(struct lndstr *); extern void intelligence_report(int, struct lndstr *, int, char *); -extern int count_sect_units(struct sctstr *); extern void count_units(struct shpstr *); extern void lnd_count_units(struct lndstr *); extern void lnd_mar(struct emp_qelem *, double *, double *, int *, natid); diff --git a/include/prototypes.h b/include/prototypes.h index ef2ad0dc..b60f22d2 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -559,7 +559,6 @@ extern void take_plane_off_ship(struct plnstr *, struct shpstr *); extern void take_plane_off_land(struct plnstr *, struct lndstr *); extern void plane_sweep(struct emp_qelem *, coord, coord); extern void count_land_planes(struct lndstr *); -extern int count_sect_planes(struct sctstr *); extern int put_plane_on_land(struct plnstr *, struct lndstr *); extern int pln_hitchance(struct plnstr *, int, int); extern int pln_damage(struct plnstr *, coord, coord, char, int *, int); diff --git a/src/lib/commands/spy.c b/src/lib/commands/spy.c index d1b806a2..290ea056 100644 --- a/src/lib/commands/spy.c +++ b/src/lib/commands/spy.c @@ -100,7 +100,7 @@ spy(void) pr("SPY report\n"); prdate(); pr(" old sct rd rl def\n"); - pr(" sect de own own eff eff eff eff civ mil shl gun pet food bars lnd pln\n"); + pr(" sect de own own eff eff eff eff civ mil shl gun pet food bars\n"); while (nxtsct(&nstr, &from)) { if (!player->owner && !player->god) continue; @@ -202,7 +202,7 @@ static void spy_report(struct sctstr *sp) { prxy("%4d,%-4d", sp->sct_x, sp->sct_y, player->cnum); - pr(" %c%c %3d %3d %3d %3d %3d %3d %4d %4d %4d %3d %4d %4d %4d %3d %3d\n", + pr(" %c%c %3d %3d %3d %3d %3d %3d %4d %4d %4d %3d %4d %4d %4d\n", dchr[sp->sct_type].d_mnem, sp->sct_newtype == sp->sct_type ? ' ' : dchr[sp->sct_newtype].d_mnem, sp->sct_own, @@ -217,9 +217,7 @@ spy_report(struct sctstr *sp) roundintby(sp->sct_item[I_GUN], 10), roundintby(sp->sct_item[I_PETROL], 10), roundintby(sp->sct_item[I_FOOD], 10), - roundintby(sp->sct_item[I_BAR], 10), - count_sect_units(sp), - count_sect_planes(sp)); + roundintby(sp->sct_item[I_BAR], 10)); prunits(sp->sct_x, sp->sct_y); prplanes(sp->sct_x, sp->sct_y); } diff --git a/src/lib/subs/lndsub.c b/src/lib/subs/lndsub.c index 395ffcf2..88670898 100644 --- a/src/lib/subs/lndsub.c +++ b/src/lib/subs/lndsub.c @@ -216,7 +216,7 @@ lnd_take_casualty(int combat_mode, struct ulist *llp, int cas) * defending unit.. find a place to send it * strategy: look for the most-populated * adjacent sector that is owned by the unit - * player->owner. Charge mob.. + * owner. Charge mob.. */ biggest = -1; nowned = 0; @@ -386,34 +386,6 @@ intelligence_report(int destination, struct lndstr *lp, int spy, } } -/* Used by the spy command to count land units in a sector. If used - for anything else, you may want to reconsider, because this doesn't - always count spies. :) */ -int -count_sect_units(struct sctstr *sp) -{ - int count = 0; - struct nstr_item ni; - struct lndstr land; - - snxtitem_all(&ni, EF_LAND); - while (nxtitem(&ni, &land)) { - if (!land.lnd_own) - continue; - if (land.lnd_x != sp->sct_x || land.lnd_y != sp->sct_y) - continue; - /* Don't always see spies */ - if (lchr[(int)land.lnd_type].l_flags & L_SPY) { - if (!(chance(LND_SPY_DETECT_CHANCE(land.lnd_effic)))) - continue; - } - /* Got here, report it */ - ++count; - } - - return count; -} - void count_units(struct shpstr *sp) { diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index c60eae46..065e2729 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -1070,26 +1070,6 @@ count_land_planes(struct lndstr *lp) putland(lp->lnd_uid, lp); } -int -count_sect_planes(struct sctstr *sp) -{ - int count = 0; - struct nstr_item ni; - struct plnstr plane; - - snxtitem_all(&ni, EF_PLANE); - while (nxtitem(&ni, &plane)) { - if (!plane.pln_own) - continue; - if (plane.pln_flags & PLN_LAUNCHED) - continue; - if (plane.pln_x == sp->sct_x && plane.pln_y == sp->sct_y) - ++count; - } - - return count; -} - int pln_hitchance(struct plnstr *pp, int hardtarget, int type) {