If a merc intentionally removes the diguise property via the [Ctrl] + [.] menu, the disguise property will not be reapplied until new clothes are applied, even if COVERT_STRIPIFUNCOVERED is set to FALSE in Skills_Settings.ini. This allows dressing up mercs in other colours without them being subject to covert mechanics.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8211 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-05-13 17:25:02 +00:00
parent 284910e2d5
commit d594ba0e67
2 changed files with 14 additions and 0 deletions
+12
View File
@@ -15878,6 +15878,10 @@ void SOLDIERTYPE::Disguise()
if ( !this->bActive || !this->bInSector )
return;
// if this flag is set, do not apply the disgusie properties
if ( this->usSoldierFlagMask2 & SOLDIER_COVERT_NOREDISGUISE )
return;
ApplyCovert( FALSE );
}
@@ -15889,6 +15893,11 @@ void SOLDIERTYPE::ApplyCovert( BOOLEAN aWithMessage )
// first, remove the covert flags, and then reapply the correct ones, in case we switch between civilian and military clothes
this->usSoldierFlagMask &= ~(SOLDIER_COVERT_CIV | SOLDIER_COVERT_SOLDIER);
// if we apply the disguise property, remove the marker that we don't want this to happen
// the idea is that if we explicitly remove a disguise, but not our new colours, we don't want to regain the disguise
// we can then lose this marker again if we explicitly put on a disguise
this->usSoldierFlagMask2 &= ~SOLDIER_COVERT_NOREDISGUISE;
// we can only disguise successfully if we are not seen
if ( !EnemySeenSoldierRecently( this ) )
{
@@ -15930,6 +15939,9 @@ void SOLDIERTYPE::Strip()
if ( this->usSoldierFlagMask & (SOLDIER_COVERT_CIV | SOLDIER_COVERT_SOLDIER) )
{
LooseDisguise( );
// if we explicitly lose the disguise property, add a flag so that we aren't redisguised again immediately
this->usSoldierFlagMask2 |= SOLDIER_COVERT_NOREDISGUISE;
}
// if already not covert, take off clothes
else if ( this->usSoldierFlagMask & (SOLDIER_NEW_VEST|SOLDIER_NEW_PANTS) )
+2
View File
@@ -413,6 +413,8 @@ enum
#define SOLDIER_HUNGOVER 0x00000400 //1024 // we drank alcohol recently, and are now hungover
#define SOLDIER_TAKEN_LARGE_HIT 0x00000800 // we recently received a lot of damage in a single hit
#define SOLDIER_COVERT_NOREDISGUISE 0x00001000 // this soldier does not want to be redisguised
#define SOLDIER_INTERROGATE_ALL 0x000001F8 // all interrogation flags
// ----------------------------------------------------------------