From cf7588cacd4d2eeb29fff4dd74d237d86ae50aa5 Mon Sep 17 00:00:00 2001 From: Sevenfm Date: Sun, 9 May 2021 03:54:41 +0000 Subject: [PATCH] Only show "sniper" message when shooter uses sniper rifle. Disabled "sniper" message for vehicles. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9014 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TacticalAI/DecideAction.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TacticalAI/DecideAction.cpp b/TacticalAI/DecideAction.cpp index 1c6bcb44..755defe7 100644 --- a/TacticalAI/DecideAction.cpp +++ b/TacticalAI/DecideAction.cpp @@ -2948,7 +2948,9 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier) //POSSIBLE STRUCTURE CHANGE PROBLEM. GOTTHARD 7/14/08 pSoldier->aiData.bAimTime = BestShot.ubAimTime; pSoldier->bScopeMode = BestShot.bScopeMode; - ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SNIPER]); + // check if using sniper rifle + if (Weapon[Item[pSoldier->inv[HANDPOS].usItem].ubClassIndex].ubWeaponType == GUN_SN_RIFLE) + ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SNIPER]); return(AI_ACTION_FIRE_GUN); } else // snipe not possible @@ -8502,7 +8504,8 @@ INT8 ArmedVehicleDecideActionRed( SOLDIERTYPE *pSoldier) //POSSIBLE STRUCTURE CHANGE PROBLEM. GOTTHARD 7/14/08 pSoldier->aiData.bAimTime = BestShot.ubAimTime; pSoldier->bScopeMode = BestShot.bScopeMode; - ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SNIPER] ); + // sevenfm: disabled for vehicles + //ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SNIPER] ); return(AI_ACTION_FIRE_GUN); } else // snipe not possible