(getrel(getnatp(ship.shp_own), pp->pln_own) != ALLIED))) {
return 0;
}
- }
- if (pp->pln_land >= 0) {
+
+ } else if (pp->pln_land >= 0) {
if (!getland(pp->pln_land, &land)) {
landdead:
pp->pln_effic = 0;
if ((land.lnd_ship >= 0) || (land.lnd_land >= 0)) {
return 0;
}
- }
- /* Now, check the sector status if not on a plane or unit */
- if ((pp->pln_ship < 0) && (pp->pln_land < 0)) {
+
+ } else {
/* If we can't get the sector, we can't check it, and can't fly */
if (!getsect(pp->pln_x, pp->pln_y, §)) {
return 0;
}
}
}
+
return 1;
}
return 1;
}
+
static int
pln_airbase_ok(struct plnstr *pp, int oneway)
{
prplane(pp));
return 0;
}
- }
- if (pp->pln_land >= 0) {
+
+ } else if (pp->pln_land >= 0) {
if (!getland(pp->pln_land, &land) ||
(pp->pln_own != player->cnum)) {
landdead:
prplane(pp));
return 0;
}
- }
- /* Now, check the sector status if not on a plane or unit */
- if ((pp->pln_ship < 0) && (pp->pln_land < 0)) {
+
+ } else {
if (!getsect(pp->pln_x, pp->pln_y, §))
return 0;
/* First, check allied status */
}
}
}
+
return 1;
}