mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Use TACTICAL_RANGE instead of DAY_VISION_RANGE for AI calculations.
Implemented Black cover advance code for AI: try to get closer to enemy using cover if soldier has low CTH or enemy too far for shooting or soldier has high morale or no cover at spot. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8931 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3929,13 +3929,13 @@ void CheckTossFriendSmoke(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow)
|
||||
bFriendLevel = pFriend->pathing.bLevel;
|
||||
sClosestOpponent = ClosestKnownOpponent(pFriend, NULL, NULL);
|
||||
|
||||
if (PythSpacesAway(sSpot, sFriendSpot) <= (INT16)DAY_VISION_RANGE &&
|
||||
PythSpacesAway(sSpot, sFriendSpot) > (INT16)DAY_VISION_RANGE / 4 &&
|
||||
if (PythSpacesAway(sSpot, sFriendSpot) <= (INT16)TACTICAL_RANGE &&
|
||||
PythSpacesAway(sSpot, sFriendSpot) > (INT16)TACTICAL_RANGE / 4 &&
|
||||
!InSmoke(sFriendSpot, bFriendLevel) &&
|
||||
(!NightLight() || InLightAtNight(sFriendSpot, bFriendLevel)) &&
|
||||
!Water(sFriendSpot, bFriendLevel) &&
|
||||
!TileIsOutOfBounds(sClosestOpponent) &&
|
||||
PythSpacesAway(sFriendSpot, sClosestOpponent) > (INT16)DAY_VISION_RANGE / 4 &&
|
||||
PythSpacesAway(sFriendSpot, sClosestOpponent) > (INT16)TACTICAL_RANGE / 4 &&
|
||||
!ProneSightCoverAtSpot(pFriend, sFriendSpot, TRUE) &&
|
||||
//!SightCoverAtSpot(pFriend, sFriendSpot, FALSE) &&
|
||||
//!AnyCoverAtSpot(pFriend, sFriendSpot) &&
|
||||
|
||||
Reference in New Issue
Block a user