(plnstr): Member pln_fuel was always equal to plchr[pln_type].pl_fuel.

Replace all uses, so pln_fuel can be removed later.
This commit is contained in:
Markus Armbruster 2004-09-10 18:27:53 +00:00
parent 9dbc1cb5e3
commit 65bb65f63d
4 changed files with 4 additions and 4 deletions

View file

@ -68,7 +68,7 @@ struct plnstr {
int pln_def; int pln_def;
int pln_acc; int pln_acc;
int pln_load; int pln_load;
int pln_fuel; int pln_fuel; /* (unused) */
s_char pln_harden; /* for missiles */ s_char pln_harden; /* for missiles */
s_char pln_nuketype; /* type of nuclear armament (if any) */ s_char pln_nuketype; /* type of nuclear armament (if any) */
s_char pln_flags; /* State of the plane */ s_char pln_flags; /* State of the plane */

View file

@ -873,7 +873,6 @@ build_plane(register struct sctstr *sp, register struct plchrstr *pp,
plane.pln_radius = 0; plane.pln_radius = 0;
plane.pln_range = UCHAR_MAX; /* will be adjusted by pln_set_tech() */ plane.pln_range = UCHAR_MAX; /* will be adjusted by pln_set_tech() */
plane.pln_range_max = plane.pln_range; plane.pln_range_max = plane.pln_range;
plane.pln_fuel = pp->pl_fuel;
plane.pln_wing = ' '; plane.pln_wing = ' ';
plane.pln_ship = -1; plane.pln_ship = -1;
plane.pln_land = -1; plane.pln_land = -1;

View file

@ -254,7 +254,7 @@ pdump(void)
pr(" %d", plane.pln_load); pr(" %d", plane.pln_load);
break; break;
case 14: case 14:
pr(" %d", plane.pln_fuel); pr(" %d", plchr[(int)plane.pln_type].pl_fuel);
break; break;
case 15: case 15:
pr(" %d", plane.pln_harden); pr(" %d", plane.pln_harden);

View file

@ -72,7 +72,8 @@ pstat(void)
plane.pln_att, plane.pln_att,
plane.pln_def, plane.pln_def,
plane.pln_acc, plane.pln_acc,
plane.pln_range_max, plane.pln_load, plane.pln_fuel); plane.pln_range_max, plane.pln_load,
plchr[(int)plane.pln_type].pl_fuel);
pr("\n"); pr("\n");
} }