(M_XLIGHT, M_CHOPPER): Redundant, remove.

(init_mchr): Don't set them.
(carrier_planes): Use m_nxlight, m_nchoppers instead.
This commit is contained in:
Markus Armbruster 2007-11-23 18:50:46 +00:00
parent b900866ea8
commit 57f589e2e4
4 changed files with 6 additions and 14 deletions

View file

@ -150,10 +150,8 @@ struct mchrstr {
#define M_SUBT bit(12) /* allows torping of other subs */
#define M_TRADE bit(13) /* is a trade ship */
#define M_SEMILAND bit(14) /* can land 1/4 */
/* M_XLIGHT will be automatically set in init_mchr() if m_nxlight > 0 */
#define M_XLIGHT bit(15) /* can hold xlight planes */
/* M_CHOPPER will be automatically set in init_mchr() if m_nchoppers > 0 */
#define M_CHOPPER bit(16) /* can hold choppers */
/* unused bit(15) */
/* unused bit(16) */
#define M_OILER bit(17) /* can re-fuel ships */
#define M_SUPPLY bit(18) /* Can supply units/sects/ships */
#define M_CANAL bit(19) /* Can navigate a canal (BIG CITY) */

View file

@ -62,10 +62,6 @@ init_mchr(void)
struct mchrstr *mp;
for (mp = mchr; mp->m_name; mp++) {
if (mp->m_nxlight)
mp->m_flags |= M_XLIGHT;
if (mp->m_nchoppers)
mp->m_flags |= M_CHOPPER;
if (mp->m_nplanes && !(mp->m_flags & M_MSL || mp->m_flags & M_FLY))
mp->m_flags |= M_MSL;
}

View file

@ -41,10 +41,8 @@
# Available flags are in ship_chr_flags[]. info Ship-types should
# document them all.
#
# Note that you can't set the flags M_XLIGHT or M_CHOPPER here. They
# will be automatically set by init_mchr() if the ship can carry a
# non-zero amount of those things. Also note that if nplanes > 0 and
# flag plane is not set, then flag miss will automatically be set.
# Note that if nplanes > 0 and flag plane is not set, then flag miss
# will automatically be set.
# Do not edit this file to customize a game! Create your own custom
# configuration file(s), best next to your econfig, and name them in

View file

@ -397,9 +397,9 @@ carrier_planes(struct shpstr *sp, int msl)
res |= P_L;
if ((mcp->m_flags & M_MSL) && msl)
res |= P_L;
if ((mcp->m_flags & M_CHOPPER) && !msl)
if (mcp->m_nchoppers && !msl)
res |= P_K;
if (mcp->m_flags & M_XLIGHT)
if (mcp->m_nxlight)
res |= P_E;
return res;
}