mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- Optimized a few code bits
- Enemy ranks has now size 20 instead of 500 - Fix: losing your disguise makes you lose your disguise again git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5687 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -15071,11 +15071,7 @@ BOOLEAN SOLDIERTYPE::RecognizeAsCombatant(UINT8 ubTargetID)
|
||||
// if neither of the 2 persons is covert, always return true
|
||||
if ( ( (pSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER)) == 0 ) && ( (this->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER)) == 0 ) )
|
||||
return TRUE;
|
||||
|
||||
// only members of the player team can ever be covert, sorry AI
|
||||
if ( pSoldier->bTeam != OUR_TEAM )
|
||||
return TRUE;
|
||||
|
||||
|
||||
// neutral characters just dont care
|
||||
if ( this->aiData.bNeutral )
|
||||
return TRUE;
|
||||
@@ -15119,6 +15115,8 @@ BOOLEAN SOLDIERTYPE::RecognizeAsCombatant(UINT8 ubTargetID)
|
||||
{
|
||||
pSoldier->LooseDisguise();
|
||||
|
||||
pSoldier->Strip();
|
||||
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_UNCOVERED], this->name, pSoldier->name );
|
||||
|
||||
// we have uncovered a spy! Get alerted, if we aren't already
|
||||
@@ -15140,14 +15138,13 @@ void SOLDIERTYPE::LooseDisguise( void )
|
||||
}
|
||||
|
||||
// undisguise or take off any clothes item and switch back to original clothes
|
||||
// no - this function does not want you think it does. Leave Fox alone, you perv.
|
||||
// no - this function does not do what you think it does. Leave Fox alone, you perv.
|
||||
void SOLDIERTYPE::Strip()
|
||||
{
|
||||
// if covert, loose that ability
|
||||
if ( this->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
||||
{
|
||||
// loose any covert flags
|
||||
this->bSoldierFlagMask &= ~(SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER);
|
||||
LooseDisguise();
|
||||
}
|
||||
// if already not covert, take off clothes
|
||||
else if ( this->bSoldierFlagMask & (SOLDIER_NEW_VEST|SOLDIER_NEW_PANTS) )
|
||||
|
||||
Reference in New Issue
Block a user