Don't store land unit stats in struct lndstr, part 1

New lnd_att(), lnd_def(), lnd_vul(), lnd_spd(), lnd_vis(), lnd_frg(),
lnd_acc(), lnd_dam(), lnd_aaf() replace the struct lndstr members with
the same names.

Make land unit selectors att, def, vul, spd, vis, frg, acc, dam, aaf
virtual.
This commit is contained in:
Markus Armbruster 2008-03-04 21:20:23 +01:00
parent f86d726406
commit cdf1bcfa22
13 changed files with 185 additions and 68 deletions

View file

@ -228,7 +228,7 @@ look_land(struct lndstr *lookland)
if (!(chance(LND_SPY_DETECT_CHANCE(lp->lnd_effic))))
continue;
}
vrange = ldround((lp->lnd_vis * range) / 20.0, 1);
vrange = ldround((lnd_vis(lp) * range) / 20.0, 1);
dist = mapdist(lp->lnd_x, lp->lnd_y,
lookland->lnd_x, lookland->lnd_y);
if (dist > vrange)