forked from 0ad/0ad
Added another check for whether a valid path is set in attackMoveToLocation
This was SVN commit r10764.
This commit is contained in:
parent
574c4135a3
commit
40c1c0010f
@ -491,7 +491,7 @@ MilitaryAttackManager.prototype.buildDefences = function(gameState, queues){
|
||||
|
||||
if (numFortresses + queues.defenceBuilding.totalLength() < gameState.getBuildLimits()["Fortress"]) {
|
||||
if (gameState.countEntitiesWithType(gameState.applyCiv("units/{civ}_support_female_citizen")) > gameState.ai.modules[0].targetNumWorkers * 0.5){
|
||||
if (gameState.getTimeElapsed() > 200 * 1000 * numFortresses){
|
||||
if (gameState.getTimeElapsed() > 350 * 1000 * numFortresses){
|
||||
if (gameState.ai.pathsToMe.length > 0){
|
||||
var position = gameState.ai.pathsToMe.shift();
|
||||
// TODO: pick a fort randomly from the list.
|
||||
|
Loading…
Reference in New Issue
Block a user