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

@ -72,7 +72,6 @@ lrange(void)
{
struct nstr_item np;
struct lndstr land;
struct lchrstr *lcp;
int i;
char *p;
char prompt[128];
@ -83,7 +82,6 @@ lrange(void)
while (nxtitem(&np, &land)) {
if (!player->owner || land.lnd_own == 0)
continue;
lcp = &lchr[(int)land.lnd_type];
sprintf(prompt, "New range for %s? ", prland(&land));
if ((p = getstarg(player->argp[2], prompt, buf)) == 0)
return RET_SYN;
@ -91,7 +89,7 @@ lrange(void)
return RET_SYN;
if ((i = atoi(p)) < 0)
continue;
land.lnd_rad_max = (i < land.lnd_rad) ? i : land.lnd_rad;
land.lnd_rad_max = MIN(i, lchr[land.lnd_type].l_rad);
pr("%s reaction radius changed to %d\n",
prland(&land), land.lnd_rad_max);
putland(land.lnd_uid, &land);