Remove columns lnd, pln from spy report to fix spy unit leak

The values in these columns were computed by count_sect_units() and
count_sect_planes(), which included land units and planes in the count
that aren't shown by prunits() and prplanes(), namely own and embarked
units.  Confusing.  Moreover, count_sect_planes() and prunits() rolled
dice separately for spy units.  This could leak the presence of spies
even when prunits() didn't show them.

All fixable, but not worth the trouble; just remove the counts.
This commit is contained in:
Markus Armbruster 2008-06-14 18:55:29 +02:00
parent c658d1e08d
commit a233ecfea9
5 changed files with 4 additions and 56 deletions

View file

@ -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)
{