(pln_airbase_ok, mission_pln_airbase_ok): Simplify conditional. Don't
check a land carrier when the plane is already on a ship.
This commit is contained in:
parent
a873eb1b4f
commit
79c2a10b30
2 changed files with 11 additions and 10 deletions
|
@ -384,6 +384,7 @@ pln_capable(struct plnstr *pp, int wantflags, int nowantflags)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
pln_airbase_ok(struct plnstr *pp, int oneway)
|
||||
{
|
||||
|
@ -414,8 +415,8 @@ 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:
|
||||
|
@ -440,9 +441,8 @@ pln_airbase_ok(struct plnstr *pp, int oneway)
|
|||
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 */
|
||||
|
@ -471,6 +471,7 @@ pln_airbase_ok(struct plnstr *pp, int oneway)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue