mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
CalcCoverValue: improved friendly fire check.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8874 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -402,11 +402,11 @@ INT32 CalcCoverValue(SOLDIERTYPE *pMe, INT32 sMyGridNo, INT32 iMyThreat, INT32 i
|
|||||||
// value... no cover give a higher value than partial cover
|
// value... no cover give a higher value than partial cover
|
||||||
bMyCTGT = CalcAverageCTGTForPosition( pMe, pHim->ubID, sHisGridNo, pHim->pathing.bLevel, iMyAPsLeft );
|
bMyCTGT = CalcAverageCTGTForPosition( pMe, pHim->ubID, sHisGridNo, pHim->pathing.bLevel, iMyAPsLeft );
|
||||||
gUnderFire.Disable();
|
gUnderFire.Disable();
|
||||||
|
ubFriendlyFireChance = gUnderFire.Chance(pMe->bTeam, pMe->bSide, TRUE);
|
||||||
|
|
||||||
// sevenfm: penalize position if friendly fire chance is high
|
// sevenfm: penalize position if friendly fire chance is high
|
||||||
if (gGameExternalOptions.fAIBetterCover && ubFriendlyFireChance > MIN_CHANCE_TO_ACCIDENTALLY_HIT_SOMEONE)
|
if (gGameExternalOptions.fAIBetterCover && ubFriendlyFireChance > MIN_CHANCE_TO_ACCIDENTALLY_HIT_SOMEONE)
|
||||||
{
|
{
|
||||||
ubFriendlyFireChance = gUnderFire.Chance(pMe->bTeam, pMe->bSide, TRUE);
|
|
||||||
bMyCTGT = 1;
|
bMyCTGT = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user