-Added check in CONSIDERED_NEUTRAL macro for SOLDIER_COVERT_CIV and SOLDIER_COVERT_SOLDIER flags. This should prevent enemies from targeting a disguised merc with sniper and spread fire.

-Added screen messages when disguise changes to indicate civilian or soldier disguise
-Enabled mercs disguised as soldiers to carry >2 guns, if the additional guns are covert or hidden


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5679 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2012-11-09 08:10:23 +00:00
parent 5844c7265c
commit e98c1ce83c
15 changed files with 32 additions and 8 deletions
+2 -2
View File
@@ -626,7 +626,7 @@ UINT32 GameInitOptionsScreenInit( void )
// Difficulty Level (Default: Experienced = 1)
gGameOptions.ubDifficultyLevel = ((UINT8)props.getIntProperty(JA2SP_INI_INITIAL_SECTION, JA2SP_DIFFICULTY_LEVEL, 1)) + 1;
// Bobby Ray Quantity (Default: Great = 2)
// Bobby Ray Quality (Default: Great = 2)
gGameOptions.ubBobbyRayQuality = (UINT8)props.getIntProperty(JA2SP_INI_INITIAL_SECTION, JA2SP_BOBBY_RAY_QUALITY, 2);
// Bobby Ray Quantity (Default: Great = 2)
@@ -3583,7 +3583,7 @@ UINT32 GameInitOptionsScreenInit( void )
// Difficulty Level (Default: Experienced = 1)
gGameOptions.ubDifficultyLevel = ((UINT8)props.getIntProperty(JA2SP_INI_INITIAL_SECTION, JA2SP_DIFFICULTY_LEVEL, 1)) + 1;
// Bobby Ray Quantity (Default: Great = 2)
// Bobby Ray Quality (Default: Great = 2)
gGameOptions.ubBobbyRayQuality = (UINT8)props.getIntProperty(JA2SP_INI_INITIAL_SECTION, JA2SP_BOBBY_RAY_QUALITY, 2);
// Bobby Ray Quantity (Default: Great = 2)
+1 -1
View File
@@ -50,7 +50,7 @@
#elif defined (JA113DEMO)
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.5520 (Development Build)" };
#else
CHAR16 zVersionLabel[256] = { L"Release v1.13.5520 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Release v1.13.5521 (Development Build)" };
#endif
#endif
+5
View File
@@ -9329,13 +9329,18 @@ BOOLEAN ApplyClothes( SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj)
if ( COMPARE_PALETTEREP_ID(pSoldier->VestPal, gUniformColors[ i ].vest) && COMPARE_PALETTEREP_ID(pSoldier->PantsPal, gUniformColors[ i ].pants) )
{
pSoldier->bSoldierFlagMask |= SOLDIER_COVERT_SOLDIER;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_DISGUISED_AS_SOLDIER], pSoldier->name );
break;
}
}
// if not dressed as a soldier, we must be dressed as a civilian
if ( !(pSoldier->bSoldierFlagMask & SOLDIER_COVERT_SOLDIER) )
{
pSoldier->bSoldierFlagMask |= SOLDIER_COVERT_CIV;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_DISGUISED_AS_CIVILIAN], pSoldier->name );
}
}
}
+3 -3
View File
@@ -14497,7 +14497,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
BOOLEAN checkfurther = FALSE;
// further checks it item is not covert. This means that a gun that has that tag will not be detected if its inside a pocket!
if ( bLoop == HANDPOS || bLoop == SECONDHANDPOS || bLoop == GUNSLINGPOCKPOS || bLoop == HELMETPOS || bLoop == VESTPOS || bLoop == LEGPOS || bLoop == HEAD1POS || bLoop == HEAD2POS )
if ( !HasItemFlag(this->inv[bLoop].usItem, COVERT) && (bLoop == HANDPOS || bLoop == SECONDHANDPOS || bLoop == GUNSLINGPOCKPOS || bLoop == HELMETPOS || bLoop == VESTPOS || bLoop == LEGPOS || bLoop == HEAD1POS || bLoop == HEAD2POS) )
checkfurther = TRUE;
else if ( bLoop == KNIFEPOCKPOS && !HasItemFlag(this->inv[bLoop].usItem, COVERT) )
checkfurther = TRUE;
@@ -14629,7 +14629,7 @@ BOOLEAN SOLDIERTYPE::EquipmentTooGood( BOOLEAN fCloselook )
}
// further checks it item is not covert. This means that an item that has that tag will not be detected if it is inside a pocket!
if ( bLoop == HANDPOS || bLoop == SECONDHANDPOS || bLoop == GUNSLINGPOCKPOS || bLoop == HELMETPOS || bLoop == VESTPOS || bLoop == LEGPOS || bLoop == HEAD1POS || bLoop == HEAD2POS )
if (!HasItemFlag(this->inv[bLoop].usItem, COVERT) && (bLoop == HANDPOS || bLoop == SECONDHANDPOS || bLoop == GUNSLINGPOCKPOS || bLoop == HELMETPOS || bLoop == VESTPOS || bLoop == LEGPOS || bLoop == HEAD1POS || bLoop == HEAD2POS) )
;
else if ( bLoop == KNIFEPOCKPOS && !HasItemFlag(this->inv[bLoop].usItem, COVERT) )
;
@@ -14675,7 +14675,7 @@ BOOLEAN SOLDIERTYPE::EquipmentTooGood( BOOLEAN fCloselook )
// if that item is a gun, explosives, military armour or facewear, investigate further
if ( (Item[this->inv[bLoop].usItem].usItemClass & (IC_GUN|IC_LAUNCHER|IC_ARMOUR|IC_FACE) ) )
{
if ( (Item[this->inv[bLoop].usItem].usItemClass & (IC_GUN|IC_LAUNCHER) ) )
if ( Item[this->inv[bLoop].usItem].usItemClass & (IC_GUN|IC_LAUNCHER) && !HasItemFlag(this->inv[bLoop].usItem, COVERT) )
{
++numberofguns;
+1 -1
View File
@@ -410,7 +410,7 @@ extern CLOTHES_STRUCT Clothes[CLOTHES_MAX];
// This macro should be used whenever we want to see if someone is neutral
// IF WE ARE CONSIDERING ATTACKING THEM. Creatures & bloodcats will attack neutrals
// but they can't attack empty vehicles!!
#define CONSIDERED_NEUTRAL( me, them ) ( (them->aiData.bNeutral) && ( me->bTeam != CREATURE_TEAM || (them->flags.uiStatusFlags & SOLDIER_VEHICLE) ) )
#define CONSIDERED_NEUTRAL( me, them ) ( (them->aiData.bNeutral || them->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER)) && ( me->bTeam != CREATURE_TEAM || (them->flags.uiStatusFlags & SOLDIER_VEHICLE) ) )
typedef struct
{
+2 -1
View File
@@ -681,7 +681,8 @@ enum
STR_COVERT_BAD_PALETTE,
STR_COVERT_NO_SKILL,
STR_COVERT_NO_UNIFORM_FOUND,
STR_COVERT_DISGUISED_AS_CIVILIAN,
STR_COVERT_DISGUISED_AS_SOLDIER,
TEXT_NUM_COVERT_STR
};
+2
View File
@@ -7441,6 +7441,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7434,6 +7434,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7422,6 +7422,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7408,6 +7408,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7249,6 +7249,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7421,6 +7421,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7435,6 +7435,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7387,6 +7387,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=
+2
View File
@@ -7438,6 +7438,8 @@ STR16 szCovertTextStr[]=
L"Bad palette found!",
L"You need the covert skill to do this!",
L"No uniform found!",
L"%s is now disguised as a civilian.",
L"%s is now disguised as a soldier.",
};
STR16 szCorpseTextStr[]=