Fix: when accessing a teammember's inventory, circumstances could cause teammembers to attack the merc accessing

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6046 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-05-01 14:58:51 +00:00
parent cde29c1388
commit e508e91cff
4 changed files with 21 additions and 3 deletions
+6 -1
View File
@@ -8552,8 +8552,13 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp
}
else if ( pTarget->bTeam == gbPlayerNum && !(gTacticalStatus.uiFlags & INCOMBAT) )
{
// Flugente: if we are on the same team adn are currently stealing (accessing inventory) from a teammember, do NOT retaliate
if ( gGameExternalOptions.fAccessOtherMercInventories && pTarget->bTeam == pSoldier->bTeam && pTarget->ubID != pSoldier->ubID && pSoldier->bSoldierFlagMask & SOLDIER_ACCESSTEAMMEMBER )
{
}
// firing at one of our own guys who is not a rebel etc
if ( pTarget->stats.bLife >= OKLIFE && !(pTarget->bCollapsed) && !AM_A_ROBOT( pTarget ) && (bReason == REASON_NORMAL_ATTACK ) )
else if ( pTarget->stats.bLife >= OKLIFE && !(pTarget->bCollapsed) && !AM_A_ROBOT( pTarget ) && (bReason == REASON_NORMAL_ATTACK ) )
{
// OK, sturn towards the prick
// Change to fire ready animation