Change: Backpacks no longer automatically break civilian disguise.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=358568&#msg_358568

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8707 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2019-11-27 21:33:55 +00:00
parent b29e9700f3
commit 32cdfc18cd
+12 -8
View File
@@ -15243,12 +15243,12 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
{ {
if ( this->inv[bLoop].exists( ) ) if ( this->inv[bLoop].exists( ) )
{ {
// if we have a back pack: not covert /*// if we have a back pack: not covert
if ( bLoop == BPACKPOCKPOS ) if ( bLoop == BPACKPOCKPOS )
{ {
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_BACKPACKFOUND], this->GetName( ) ); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_BACKPACKFOUND], this->GetName( ) );
return FALSE; return FALSE;
} }*/
// do not check the LBE itself (we already checked for camo above) // do not check the LBE itself (we already checked for camo above)
if ( bLoop >= VESTPOCKPOS && bLoop <= CPACKPOCKPOS ) if ( bLoop >= VESTPOCKPOS && bLoop <= CPACKPOCKPOS )
@@ -15266,17 +15266,17 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
// guns/launchers in our hands will always be noticed, even if covert // guns/launchers in our hands will always be noticed, even if covert
if ( (Item[this->inv[bLoop].usItem].usItemClass & (IC_GUN | IC_LAUNCHER)) && (bLoop == HANDPOS || bLoop == SECONDHANDPOS) ) if ( (Item[this->inv[bLoop].usItem].usItemClass & (IC_GUN | IC_LAUNCHER)) && (bLoop == HANDPOS || bLoop == SECONDHANDPOS) )
checkfurther = TRUE; checkfurther = TRUE;
// visible slots are always checked if not covert
else 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;
// knife slot is checked if the knife is not covert
else if ( bLoop == KNIFEPOCKPOS && !HasItemFlag( this->inv[bLoop].usItem, COVERT ) )
checkfurther = TRUE;
// 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! // 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!
else if ( !HasItemFlag( this->inv[bLoop].usItem, COVERT ) ) else if ( !HasItemFlag( this->inv[bLoop].usItem, COVERT ) )
{ {
checkfurther = TRUE; checkfurther = TRUE;
// visible slots are always checked if not covert
if ( bLoop == HANDPOS || bLoop == SECONDHANDPOS || bLoop == GUNSLINGPOCKPOS || bLoop == KNIFEPOCKPOS || bLoop == HELMETPOS || bLoop == VESTPOS || bLoop == LEGPOS || bLoop == HEAD1POS || bLoop == HEAD2POS )
;
else
{
// check for the pocket the item is in
// item will be detected if someone looks - check for the LBE item that gave us this slot. If that one is covert, this item is also covert // item will be detected if someone looks - check for the LBE item that gave us this slot. If that one is covert, this item is also covert
UINT8 checkslot = 0; UINT8 checkslot = 0;
switch ( uiNIVSlotType[bLoop] ) switch ( uiNIVSlotType[bLoop] )
@@ -15296,6 +15296,9 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
case 5: case 5:
checkslot = CPACKPOCKPOS; checkslot = CPACKPOCKPOS;
break; break;
case 6:
checkslot = BPACKPOCKPOS;
break;
default: default:
{ {
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_ITEM_SUSPICIOUS], this->GetName(), Item[this->inv[bLoop].usItem].szItemName ); //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_ITEM_SUSPICIOUS], this->GetName(), Item[this->inv[bLoop].usItem].szItemName );
@@ -15313,6 +15316,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void )
checkfurther = FALSE; checkfurther = FALSE;
} }
} }
}
if ( checkfurther ) if ( checkfurther )
{ {