Only show "suppression fire" message if target soldier cannot be seen after turning.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8903 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2020-10-16 20:44:21 +00:00
parent b5cbc32261
commit 43ab995ecd
+9 -2
View File
@@ -3113,14 +3113,21 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
pSoldier->aiData.usActionData = BestShot.ubStance;
DebugAI(AI_MSG_INFO, pSoldier, String("Change stance before shooting"));
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SUPPRESSIONFIRE]);
// show "suppression fire" message only if opponent cannot be seen after turning
if (!LOS_Raised(pSoldier, MercPtrs[BestShot.ubOpponent], CALC_FROM_ALL_DIRS))
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SUPPRESSIONFIRE]);
return(AI_ACTION_CHANGE_STANCE);
}
else
{
pSoldier->aiData.usActionData = BestShot.sTarget;
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SUPPRESSIONFIRE]);
// show "suppression fire" message only if opponent cannot be seen after turning
if (!LOS_Raised(pSoldier, MercPtrs[BestShot.ubOpponent], CALC_FROM_ALL_DIRS))
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_SUPPRESSIONFIRE]);
return(AI_ACTION_FIRE_GUN);
}
}