1
0
forked from 0ad/0ad

Also try to strip the 'resource|' prefix when handling a GatherNearPosition order.

This was SVN commit r12555.
This commit is contained in:
Deiz 2012-08-30 08:18:43 +00:00
parent 8968df0554
commit 221c7dacde

View File

@ -3047,6 +3047,10 @@ UnitAI.prototype.PerformGather = function(target, queued, force)
*/
UnitAI.prototype.GatherNearPosition = function(x, z, type, template, queued)
{
// Remove "resource|" prefix from template name, if present.
if (template.indexOf("resource|") != -1)
template = template.slice(9);
this.AddOrder("GatherNearPosition", { "type": type, "template": template, "x": x, "z": z, "force": false }, queued);
};