From 3a015ed1e6a7f88c94f395cce1880c20b6951394 Mon Sep 17 00:00:00 2001 From: Flugente Date: Wed, 12 Nov 2014 21:08:08 +0000 Subject: [PATCH] Fix: dynamic opinions: mercs will only complain about the killing of civilains if they aren't hostile at the moment of their death git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7652 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Auto Resolve.cpp | 5 +++-- Tactical/Soldier Ani.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Strategic/Auto Resolve.cpp b/Strategic/Auto Resolve.cpp index ce308e1fc..449a7ba94 100644 --- a/Strategic/Auto Resolve.cpp +++ b/Strategic/Auto Resolve.cpp @@ -4709,8 +4709,9 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget ) { gMercProfiles[ pAttacker->pSoldier->ubProfile ].records.usKillsOthers++; - // Flugente: dynamic opinions - HandleDynamicOpinionChange( pAttacker->pSoldier, OPINIONEVENT_CIVKILLER, TRUE, TRUE ); + // Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians + if ( pTarget->pSoldier->aiData.bNeutral || pTarget->pSoldier->bSide == pAttacker->pSoldier->bSide ) + HandleDynamicOpinionChange( pAttacker->pSoldier, OPINIONEVENT_CIVKILLER, TRUE, TRUE ); } break; } diff --git a/Tactical/Soldier Ani.cpp b/Tactical/Soldier Ani.cpp index dbc0e37ea..af22c58f1 100644 --- a/Tactical/Soldier Ani.cpp +++ b/Tactical/Soldier Ani.cpp @@ -3943,8 +3943,9 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse ) { gMercProfiles[ MercPtrs[ ubAttacker ]->ubProfile ].records.usKillsOthers++; - // Flugente: dynamic opinions - HandleDynamicOpinionChange( MercPtrs[ubAttacker], OPINIONEVENT_CIVKILLER, TRUE, TRUE ); + // Flugente: dynamic opinions: if this guy is not hostile towards us, then some mercs will complain about killing civilians + if ( pSoldier->aiData.bNeutral || pSoldier->bSide == MercPtrs[ubAttacker]->bSide ) + HandleDynamicOpinionChange( MercPtrs[ubAttacker], OPINIONEVENT_CIVKILLER, TRUE, TRUE ); } break; }