]> git.pond.sub.org Git - empserver/commitdiff
(plnstr): Member pln_fuel was always equal to plchr[pln_type].pl_fuel.
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 10 Sep 2004 18:27:53 +0000 (18:27 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 10 Sep 2004 18:27:53 +0000 (18:27 +0000)
Replace all uses, so pln_fuel can be removed later.

include/plane.h
src/lib/commands/buil.c
src/lib/commands/pdump.c
src/lib/commands/pstat.c

index 2fdc26ae0f65436f48f528b8df8d2cfc1f14d6a3..5c82a501cf0690473624e29cc9d028ff8a6be753 100644 (file)
@@ -68,7 +68,7 @@ struct plnstr {
     int pln_def;
     int pln_acc;
     int pln_load;
-    int pln_fuel;
+    int pln_fuel;              /* (unused) */
     s_char pln_harden;         /* for missiles */
     s_char pln_nuketype;       /* type of nuclear armament (if any) */
     s_char pln_flags;          /* State of the plane */
index 93200a033d56f62a6e6e4b0b6a023e530c92e4bf..b689a96fc709f5b7e7e8cbbeac08261f25dd5ced 100644 (file)
@@ -873,7 +873,6 @@ build_plane(register struct sctstr *sp, register struct plchrstr *pp,
     plane.pln_radius = 0;
     plane.pln_range = UCHAR_MAX; /* will be adjusted by pln_set_tech() */
     plane.pln_range_max = plane.pln_range;
-    plane.pln_fuel = pp->pl_fuel;
     plane.pln_wing = ' ';
     plane.pln_ship = -1;
     plane.pln_land = -1;
index 3cd8a9223f9391e84f5fb4627c3282a05d33d292..183c3ebd939a6070491cc518b2a02de86d539801 100644 (file)
@@ -254,7 +254,7 @@ pdump(void)
                pr(" %d", plane.pln_load);
                break;
            case 14:
-               pr(" %d", plane.pln_fuel);
+               pr(" %d", plchr[(int)plane.pln_type].pl_fuel);
                break;
            case 15:
                pr(" %d", plane.pln_harden);
index d77014af186d105f865e5b7eb442fccbf2ca0ae3..fc36ed4f6188c09f1560a4b9f27a5e5e89358bd2 100644 (file)
@@ -72,7 +72,8 @@ pstat(void)
           plane.pln_att,
           plane.pln_def,
           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");
     }