mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
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:
@@ -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,51 +15266,55 @@ 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;
|
||||||
|
|
||||||
// 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
|
// visible slots are always checked if not covert
|
||||||
UINT8 checkslot = 0;
|
if ( bLoop == HANDPOS || bLoop == SECONDHANDPOS || bLoop == GUNSLINGPOCKPOS || bLoop == KNIFEPOCKPOS || bLoop == HELMETPOS || bLoop == VESTPOS || bLoop == LEGPOS || bLoop == HEAD1POS || bLoop == HEAD2POS )
|
||||||
switch ( uiNIVSlotType[bLoop] )
|
;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
case 2:
|
// check for the pocket the item is in
|
||||||
// this is worn LBE gear itself
|
// 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
|
||||||
break;
|
UINT8 checkslot = 0;
|
||||||
case 3:
|
switch ( uiNIVSlotType[bLoop] )
|
||||||
checkslot = VESTPOCKPOS;
|
{
|
||||||
break;
|
case 2:
|
||||||
case 4:
|
// this is worn LBE gear itself
|
||||||
if ( bLoop == MEDPOCK3POS || bLoop == SMALLPOCK11POS || bLoop == SMALLPOCK12POS || bLoop == SMALLPOCK13POS || bLoop == SMALLPOCK14POS )
|
break;
|
||||||
checkslot = LTHIGHPOCKPOS;
|
case 3:
|
||||||
else
|
checkslot = VESTPOCKPOS;
|
||||||
checkslot = RTHIGHPOCKPOS;
|
break;
|
||||||
break;
|
case 4:
|
||||||
case 5:
|
if ( bLoop == MEDPOCK3POS || bLoop == SMALLPOCK11POS || bLoop == SMALLPOCK12POS || bLoop == SMALLPOCK13POS || bLoop == SMALLPOCK14POS )
|
||||||
checkslot = CPACKPOCKPOS;
|
checkslot = LTHIGHPOCKPOS;
|
||||||
break;
|
else
|
||||||
default:
|
checkslot = RTHIGHPOCKPOS;
|
||||||
{
|
break;
|
||||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_ITEM_SUSPICIOUS], this->GetName(), Item[this->inv[bLoop].usItem].szItemName );
|
case 5:
|
||||||
//return FALSE;
|
checkslot = CPACKPOCKPOS;
|
||||||
}
|
break;
|
||||||
break;
|
case 6:
|
||||||
}
|
checkslot = BPACKPOCKPOS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_ITEM_SUSPICIOUS], this->GetName(), Item[this->inv[bLoop].usItem].szItemName );
|
||||||
|
//return FALSE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// found a slot to check for LBE
|
// found a slot to check for LBE
|
||||||
if ( checkslot > 0 )
|
if ( checkslot > 0 )
|
||||||
{
|
{
|
||||||
// if LBE is covert
|
// if LBE is covert
|
||||||
if ( this->inv[checkslot].exists( ) && HasItemFlag( this->inv[checkslot].usItem, COVERT ) )
|
if ( this->inv[checkslot].exists() && HasItemFlag( this->inv[checkslot].usItem, COVERT ) )
|
||||||
// pass for this item
|
// pass for this item
|
||||||
checkfurther = FALSE;
|
checkfurther = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user