mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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:
@@ -691,8 +691,8 @@ INT8 ZombieDecideActionRed(SOLDIERTYPE *pSoldier)
|
||||
|
||||
// sevenfm: try to advance using sight cover
|
||||
if( gfTurnBasedAI &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) < DAY_VISION_RANGE * 2 &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) > DAY_VISION_RANGE / 4 &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) < TACTICAL_RANGE * 2 &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) > TACTICAL_RANGE / 4 &&
|
||||
!SightCoverAtSpot(pSoldier, pSoldier->aiData.usActionData, TRUE))
|
||||
{
|
||||
INT32 sAdvanceSpot = FindAdvanceSpot(pSoldier, sClosestDisturbance, AI_ACTION_SEEK_OPPONENT, ADVANCE_SPOT_SIGHT_COVER, TRUE);
|
||||
@@ -1169,8 +1169,8 @@ INT8 ZombieDecideActionBlack(SOLDIERTYPE *pSoldier)
|
||||
{
|
||||
// sevenfm: try to advance using sight cover
|
||||
if( gfTurnBasedAI &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) < DAY_VISION_RANGE * 2 &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) > DAY_VISION_RANGE / 4 &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) < TACTICAL_RANGE * 2 &&
|
||||
PythSpacesAway(pSoldier->sGridNo, sClosestDisturbance) > TACTICAL_RANGE / 4 &&
|
||||
!SightCoverAtSpot(pSoldier, pSoldier->aiData.usActionData, TRUE))
|
||||
{
|
||||
DebugAI( AI_MSG_INFO, pSoldier, String("[advance spot]"));
|
||||
|
||||
Reference in New Issue
Block a user