Ticket #3037: 3037.2.diff

File 3037.2.diff, 892 bytes (added by Stan, 9 years ago)
  • binaries/data/mods/public/simulation/components/UnitAI.js

     
    50585058    if (template.indexOf("resource|") != -1)
    50595059        template = template.slice(9);
    50605060
    5061     if (!Engine.QueryInterface(this.entity, IID_ResourceGatherer))
     5061    if (this.IsFormationController() && Engine.QueryInterface(this.entity, IID_ResourceGatherer))
     5062        this.AddOrder("GatherNearPosition", { "type": type, "template": template, "x": x, "z": z, "force": false }, queued);
     5063    else
    50625064        this.AddOrder("Walk", { "x": x, "z": z, "force": false }, queued);
    5063     else
    5064         this.AddOrder("GatherNearPosition", { "type": type, "template": template, "x": x, "z": z, "force": false }, queued);
    50655065};
    50665066
    50675067/**