1
0
forked from mirrors/0ad

petra: fix oversight in 5a2b3d3d5d

This was SVN commit r21346.
This commit is contained in:
mimo
2018-02-24 10:41:59 +00:00
parent 7c7d74cf2e
commit b11ff0df68
@@ -588,9 +588,6 @@ m.NavalManager.prototype.moveApart = function(gameState)
continue;
ship.setMetadata(PlayerID, "previousIdlePosition", shipPosition);
// Check if there are some treasure around
let rates = ship.resourceGatherRates();
if (!rates || !rates.treasure || rates.treasure <= 0)
continue;
if (m.gatherTreasure(gameState, ship, true))
continue;
// Do not stay idle near a dock to not disturb other ships
@@ -634,9 +631,6 @@ m.NavalManager.prototype.moveApart = function(gameState)
continue;
ship.setMetadata(PlayerID, "previousIdlePosition", shipPosition);
// Check if there are some treasure around
let rates = ship.resourceGatherRates();
if (!rates || !rates.treasure || rates.treasure <= 0)
continue;
if (m.gatherTreasure(gameState, ship, true))
continue;
// Do not stay idle near a dock to not disturb other ships