From 8b41be236a492eba67380a8f9a1784cf9124418c Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 4 Jan 2018 15:57:36 +0000 Subject: [PATCH] If a merc harms themself, use a voice line git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8513 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Hourly Update.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Strategic/Hourly Update.cpp b/Strategic/Hourly Update.cpp index a95637b0..000ffbae 100644 --- a/Strategic/Hourly Update.cpp +++ b/Strategic/Hourly Update.cpp @@ -570,7 +570,7 @@ void HourlyDisabilityUpdate( ) { // don't do this if we are at low health, or in combat, or travelling, or a patient or doctor // only do this if we are rather healed - if ( pSoldier->stats.bLife >= OKLIFE && pSoldier->stats.bLifeMax > 0 && (FLOAT)(pSoldier->stats.bLife) / (FLOAT)(pSoldier->stats.bLifeMax) > 0.9f + if ( pSoldier->stats.bLife > OKLIFE && pSoldier->stats.bLifeMax > 0 && (FLOAT)(pSoldier->stats.bLife) / (FLOAT)(pSoldier->stats.bLifeMax) > 0.9f && !pSoldier->flags.fBetweenSectors && !gTacticalStatus.fEnemyInSector && !IS_PATIENT( pSoldier->bAssignment ) && pSoldier->bAssignment != IN_TRANSIT ) { @@ -627,6 +627,9 @@ void HourlyDisabilityUpdate( ) // Flugente: dynamic opinions HandleDynamicOpinionChange( pSoldier, OPINIONEVENT_ANNOYINGDISABILITY, TRUE, TRUE ); + + // say something (which might also alert the player to what we just did) + TacticalCharacterDialogue( pSoldier, QUOTE_PERSONALITY_TRAIT ); } } }