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

struct lndstr members lnd_spy, lnd_rad, lnd_ammo, lnd_fuelc,
lnd_fuelu, lnd_maxlight, lnd_maxlight are mere copies of struct
lchrstr members l_spy, l_rad, l_ammo, l_fuelc, l_fuelu, l_nxlight,
l_nland.  Remove them.

Make land unit selectors spy, rmax, ammo, fuelc, fuelu, maxlight
virtual.
This commit is contained in:
Markus Armbruster 2008-03-04 21:27:30 +01:00
parent cdf1bcfa22
commit c75d19b082
12 changed files with 57 additions and 57 deletions

View file

@ -322,9 +322,9 @@ int
lnd_spyval(struct lndstr *lp)
{
if (lchr[(int)lp->lnd_type].l_flags & L_RECON)
return lp->lnd_spy * (lp->lnd_effic / 100.0) + 2;
return lchr[lp->lnd_type].l_spy * (lp->lnd_effic / 100.0) + 2;
else
return lp->lnd_spy * (lp->lnd_effic / 100.0);
return lchr[lp->lnd_type].l_spy * (lp->lnd_effic / 100.0);
}
void
@ -1236,11 +1236,4 @@ lnd_set_tech(struct lndstr *lp, int tlev)
tlev = 0;
lp->lnd_tech = tlev;
lp->lnd_spy = lcp->l_spy;
lp->lnd_rad = lcp->l_rad;
lp->lnd_ammo = lcp->l_ammo;
lp->lnd_fuelc = lcp->l_fuelc;
lp->lnd_fuelu = lcp->l_fuelu;
lp->lnd_maxlight = lcp->l_nxlight;
lp->lnd_maxland = lcp->l_nland;
}