]> git.pond.sub.org Git - empserver/commitdiff
Comment and white-space cleanup.
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 3 Nov 2007 08:57:05 +0000 (08:57 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 3 Nov 2007 08:57:05 +0000 (08:57 +0000)
src/lib/subs/plnsub.c

index c042decb7ad335337b8bc7cdb26db0b1a65c2b38..d81e34aa86e9e1a9cab141fdfb55531125612734 100644 (file)
@@ -397,6 +397,7 @@ pln_airbase_ok(struct plnstr *pp, int oneway)
        return 0;
 
     if (pp->pln_ship >= 0) {
+       /* ship: needs to be own or allied, efficient */
        if (!getship(pp->pln_ship, &ship)) {
            CANT_REACH();
            return 0;
@@ -415,6 +416,7 @@ pln_airbase_ok(struct plnstr *pp, int oneway)
            return 0;
 
     } else if (pp->pln_land >= 0) {
+       /* land: needs to be own or allied, efficient, not embarked */
        if (!getland(pp->pln_land, &land)) {
            CANT_REACH();
            return 0;
@@ -435,26 +437,28 @@ pln_airbase_ok(struct plnstr *pp, int oneway)
            return 0;
 
     } else {
+       /* sector: needs to be own or allied, efficient airfield */
        if (!getsect(pp->pln_x, pp->pln_y, &sect)) {
            CANT_REACH();
            return 0;
        }
-       /* First, check allied status */
-       /* Can't fly from non-owned sectors or non-allied sectors */
+
        if (sect.sct_own != pp->pln_own
            && getrel(getnatp(sect.sct_own), pp->pln_own) != ALLIED) {
            pr("(note) An ally does not own the sector %s is in\n",
               prplane(pp));
            return 0;
        }
-       /* non-vtol plane */
+       /* need airfield unless VTOL */
        if ((pcp->pl_flags & P_V) == 0) {
            if (sect.sct_type != SCT_AIRPT) {
                pr("%s not at airport\n", prplane(pp));
                return 0;
            }
            if (sect.sct_effic < 40) {
-               pr("%s is not 40%% efficient, %s can't take off from there.\n", xyas(sect.sct_x, sect.sct_y, pp->pln_own), prplane(pp));
+               pr("%s is not 40%% efficient, %s can't take off from there.\n",
+                  xyas(sect.sct_x, sect.sct_y, pp->pln_own),
+                  prplane(pp));
                return 0;
            }
            if (!oneway && sect.sct_effic < 60) {