(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:
parent
b900866ea8
commit
57f589e2e4
4 changed files with 6 additions and 14 deletions
|
@ -150,10 +150,8 @@ struct mchrstr {
|
||||||
#define M_SUBT bit(12) /* allows torping of other subs */
|
#define M_SUBT bit(12) /* allows torping of other subs */
|
||||||
#define M_TRADE bit(13) /* is a trade ship */
|
#define M_TRADE bit(13) /* is a trade ship */
|
||||||
#define M_SEMILAND bit(14) /* can land 1/4 */
|
#define M_SEMILAND bit(14) /* can land 1/4 */
|
||||||
/* M_XLIGHT will be automatically set in init_mchr() if m_nxlight > 0 */
|
/* unused bit(15) */
|
||||||
#define M_XLIGHT bit(15) /* can hold xlight planes */
|
/* unused bit(16) */
|
||||||
/* M_CHOPPER will be automatically set in init_mchr() if m_nchoppers > 0 */
|
|
||||||
#define M_CHOPPER bit(16) /* can hold choppers */
|
|
||||||
#define M_OILER bit(17) /* can re-fuel ships */
|
#define M_OILER bit(17) /* can re-fuel ships */
|
||||||
#define M_SUPPLY bit(18) /* Can supply units/sects/ships */
|
#define M_SUPPLY bit(18) /* Can supply units/sects/ships */
|
||||||
#define M_CANAL bit(19) /* Can navigate a canal (BIG CITY) */
|
#define M_CANAL bit(19) /* Can navigate a canal (BIG CITY) */
|
||||||
|
|
|
@ -62,10 +62,6 @@ init_mchr(void)
|
||||||
struct mchrstr *mp;
|
struct mchrstr *mp;
|
||||||
|
|
||||||
for (mp = mchr; mp->m_name; 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))
|
if (mp->m_nplanes && !(mp->m_flags & M_MSL || mp->m_flags & M_FLY))
|
||||||
mp->m_flags |= M_MSL;
|
mp->m_flags |= M_MSL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,10 +41,8 @@
|
||||||
# Available flags are in ship_chr_flags[]. info Ship-types should
|
# Available flags are in ship_chr_flags[]. info Ship-types should
|
||||||
# document them all.
|
# document them all.
|
||||||
#
|
#
|
||||||
# Note that you can't set the flags M_XLIGHT or M_CHOPPER here. They
|
# Note that if nplanes > 0 and flag plane is not set, then flag miss
|
||||||
# will be automatically set by init_mchr() if the ship can carry a
|
# will automatically be set.
|
||||||
# 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.
|
|
||||||
|
|
||||||
# Do not edit this file to customize a game! Create your own custom
|
# 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
|
# configuration file(s), best next to your econfig, and name them in
|
||||||
|
|
|
@ -397,9 +397,9 @@ carrier_planes(struct shpstr *sp, int msl)
|
||||||
res |= P_L;
|
res |= P_L;
|
||||||
if ((mcp->m_flags & M_MSL) && msl)
|
if ((mcp->m_flags & M_MSL) && msl)
|
||||||
res |= P_L;
|
res |= P_L;
|
||||||
if ((mcp->m_flags & M_CHOPPER) && !msl)
|
if (mcp->m_nchoppers && !msl)
|
||||||
res |= P_K;
|
res |= P_K;
|
||||||
if (mcp->m_flags & M_XLIGHT)
|
if (mcp->m_nxlight)
|
||||||
res |= P_E;
|
res |= P_E;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue