Distinguish between planes "in orbit" and "launched"

Use new pln_is_in_orbit() when we want to test for orbit specifically,
and test PLN_LAUNCHED when we want to test whether the plane not
sitting in the sector (because it is flying).  This distinction is
pointless at this time, because the only way PLN_LAUNCHED gets set is
when a satellite goes into orbit.  It will become useful in a later
commit, which will use PLN_LAUNCHED to mark flying planes.
This commit is contained in:
Markus Armbruster 2008-03-22 18:38:51 +01:00
parent 5e930f5fdf
commit 8006543878
12 changed files with 26 additions and 27 deletions

View file

@ -272,10 +272,12 @@ pupgr(void)
plane.pln_uid);
continue;
}
if (plane.pln_flags & PLN_LAUNCHED) {
if (pln_is_in_orbit(&plane)) {
pr("Plane %s is in orbit!\n", prplane(&plane));
continue;
}
if (plane.pln_flags & PLN_LAUNCHED)
continue;
n++;
pp = &plchr[(int)plane.pln_type];
avail = (PLN_BLD_WORK(pp->pl_lcm, pp->pl_hcm) * UPGR_COST + 99) / 100;