From 55df03f4ff22ff39c6f9d902338806631411d1cf Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 1 Nov 2007 07:25:21 +0000 Subject: [PATCH] (fit_plane_on_ship, fit_plane_off_ship): Don't require M_CHOPPER for use of chopper slot. Same for M_XLIGHT and x-light slot. No functional change, because presence of slots implies the flags (see init_mchr()). --- src/lib/subs/plnsub.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index 83e1ef7c..226edfe6 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -807,12 +807,10 @@ fit_plane_on_ship(struct plnstr *pp, struct shpstr *sp) struct plchrstr *pcp = plchr + pp->pln_type; struct mchrstr *mcp = mchr + sp->shp_type; - if ((pcp->pl_flags & P_K) && (mcp->m_flags & M_CHOPPER) - && sp->shp_nchoppers < mcp->m_nchoppers) + if ((pcp->pl_flags & P_K) && sp->shp_nchoppers < mcp->m_nchoppers) return ++sp->shp_nchoppers; - if ((pcp->pl_flags & P_E) && (mcp->m_flags & M_XLIGHT) - && sp->shp_nxlight < mcp->m_nxlight) + if ((pcp->pl_flags & P_E) && sp->shp_nxlight < mcp->m_nxlight) return ++sp->shp_nxlight; if (!(pcp->pl_flags & P_L)) @@ -840,16 +838,13 @@ fit_plane_off_ship(struct plnstr *pp, struct shpstr *sp) * run count_planes() before fit_plane_on_ship(). */ struct plchrstr *pcp = plchr + pp->pln_type; - struct mchrstr *mcp = mchr + sp->shp_type; - if ((pcp->pl_flags & P_K) && (mcp->m_flags & M_CHOPPER) - && sp->shp_nchoppers) { + if ((pcp->pl_flags & P_K) && sp->shp_nchoppers) { sp->shp_nchoppers--; return; } - if ((pcp->pl_flags & P_E) && (mcp->m_flags & M_XLIGHT) - && sp->shp_nxlight) { + if ((pcp->pl_flags & P_E) && sp->shp_nxlight) { sp->shp_nxlight--; return; } @@ -901,7 +896,7 @@ fit_plane_on_land(struct plnstr *pp, struct lndstr *lp) struct plchrstr *pcp = plchr + pp->pln_type; struct lchrstr *lcp = lchr + lp->lnd_type; - if ((pcp->pl_flags & P_E) && (lp->lnd_nxlight < lcp->l_nxlight)) + if ((pcp->pl_flags & P_E) && lp->lnd_nxlight < lcp->l_nxlight) return ++lp->lnd_nxlight; return 0;