mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Try to find a cover spot when advancing to attack
Calling InternalGoAsFarAsPossibleTowards() with target's gridno means AI doesn't take into account eg. nearby friendlies resulting in them bunching up and making a beeline straight at whoever they're trying to attack. We'll first at least attempt to find a cover spot near said target, if it doesn't work, only then head straight at them.
This commit is contained in:
+1
-1
@@ -199,7 +199,7 @@ void EndAIGuysTurn( SOLDIERTYPE *pSoldier );
|
||||
INT8 ExecuteAction(SOLDIERTYPE *pSoldier);
|
||||
|
||||
INT32 FindAdjacentSpotBeside(SOLDIERTYPE *pSoldier, INT32 sGridNo);
|
||||
INT32 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *pPercentBetter);
|
||||
INT32 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *pPercentBetter, INT32 targetGridNo = NOWHERE);
|
||||
INT32 FindClosestDoor( SOLDIERTYPE * pSoldier );
|
||||
INT32 FindNearbyPointOnEdgeOfMap( SOLDIERTYPE * pSoldier, INT8 * pbDirection );
|
||||
INT32 FindNearestEdgePoint( INT32 sGridNo );
|
||||
|
||||
Reference in New Issue
Block a user