(could_be_on_ship): Not consistent with fit_plane_on_ship(). Fix by
using that. Less efficient, but that doesn't really matter here.
This commit is contained in:
parent
d3fcc89f56
commit
9c98b7b14b
1 changed files with 5 additions and 20 deletions
|
@ -952,31 +952,16 @@ take_plane_off_land(struct plnstr *plane, struct lndstr *land)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Could a plane of PP's type be on on a ship of SP's type?
|
* Could a plane of PP's type be on on ship SP?
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
could_be_on_ship(struct plnstr *pp, struct shpstr *sp)
|
could_be_on_ship(struct plnstr *pp, struct shpstr *sp)
|
||||||
{
|
{
|
||||||
struct plchrstr *pcp = plchr + pp->pln_type;
|
struct shpstr ship;
|
||||||
struct mchrstr *mcp = mchr + sp->shp_type;
|
|
||||||
|
|
||||||
if (pcp->pl_flags & P_L)
|
ship = *sp;
|
||||||
if (mcp->m_flags & M_FLY)
|
sp->shp_nplane = sp->shp_nchoppers = sp->shp_nxlight = 0;
|
||||||
return 1;
|
return fit_plane_on_ship(pp, &ship);
|
||||||
|
|
||||||
if (pcp->pl_flags & P_K)
|
|
||||||
if (mcp->m_flags & M_CHOPPER)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (pcp->pl_flags & P_M)
|
|
||||||
if (mcp->m_flags & M_MSL)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (pcp->pl_flags & P_E)
|
|
||||||
if (mcp->m_flags & M_XLIGHT)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue