mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: civilians could openly wield covert guns
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6161 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -14668,11 +14668,17 @@ 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 ( !HasItemFlag(this->inv[bLoop].usItem, COVERT) && (bLoop == HANDPOS || bLoop == SECONDHANDPOS || bLoop == GUNSLINGPOCKPOS || bLoop == HELMETPOS || bLoop == VESTPOS || bLoop == LEGPOS || bLoop == HEAD1POS || bLoop == HEAD2POS) )
|
||||
|
||||
// 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 ) )
|
||||
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!
|
||||
else if ( !HasItemFlag(this->inv[bLoop].usItem, COVERT) )
|
||||
{
|
||||
checkfurther = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user