some aegis fixes, patch by falsevision, close #2617

This was SVN commit r15313.
This commit is contained in:
mimo 2014-06-09 07:48:29 +00:00
parent 91a511560c
commit 5f42834710
3 changed files with 5 additions and 4 deletions

View File

@ -1022,9 +1022,9 @@ m.HQ.prototype.constructTrainingBuildings = function(gameState, queues) {
if (gameState.civ() !== "gaul" && gameState.civ() !== "brit" && gameState.civ() !== "iber" &&
workersNumber > 130 && gameState.currentPhase() > 2)
{
var Const = 0;
var inConst = 0;
for (var i in this.bAdvanced)
Const += gameState.countEntitiesByType(gameState.applyCiv(this.bAdvanced[i]), true);
inConst += gameState.countEntitiesByType(gameState.applyCiv(this.bAdvanced[i]), true);
if (inConst == 1) {
var i = Math.floor(Math.random() * this.bAdvanced.length);
if (gameState.countEntitiesAndQueuedByType(gameState.applyCiv(this.bAdvanced[i]), true) < 1){

View File

@ -271,7 +271,7 @@ m.NavalManager.prototype.update = function(gameState, queues, events) {
if (dock.getMetadata(PlayerID,"sea") == seaZone)
rallyPos = dock.position();
});
this.transportPlans[i].ships.move(rallyPos);
this.transportPlans[i].ships.move(rallyPos[0], rallyPos[1]);
this.transportPlans[i].releaseAll(gameState);
this.transportPlans.splice(i,1);
--i;

View File

@ -81,7 +81,8 @@ m.TransportPlan.prototype.countFreeSlots = function(onlyTrulyFree)
if (onlyTrulyFree)
slots -= ent.garrisoned().length;
});
}
return slots;
};
m.TransportPlan.prototype.assignShip = function(gameState, ship)
{