1
0
forked from mirrors/0ad

Fix AI tasking catafalques to the center of the CC.

There is some unit-motion/unitAI bug that makes them not reach the
center and hence idleness.

Refs. #6735 by fixing the specific PetraAI <> catafalque case.
Reported and solution by: @Langbart
This was SVN commit r27544.
This commit is contained in:
Freagarach
2023-02-15 14:30:08 +00:00
parent ee88cd353c
commit 6ea5d33406
@@ -473,8 +473,9 @@ PETRA.VictoryManager.prototype.pickCriticalEntRetreatLocation = function(gameSta
let bestBase = PETRA.getBestBase(gameState, criticalEnt, true);
if (bestBase.accessIndex == accessIndex)
{
let bestBasePos = bestBase.anchor.position();
criticalEnt.move(bestBasePos[0], bestBasePos[1]);
const bestBasePos = bestBase.anchor.position();
criticalEnt.moveToRange(bestBasePos[0], bestBasePos[1],
0, gameState.getEntityById(bestBase.anchorId).obstructionRadius().max);
}
};