Index: ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js +++ ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js @@ -494,13 +494,6 @@ return ACCEPT_ORDER; } - // If the unit is full go to the nearest dropsite instead of trying to gather. - if (!cmpResourceGatherer.CanCarryMore(msg.data.type.generic)) - { - this.SetNextState("INDIVIDUAL.GATHER.RETURNINGRESOURCE"); - return ACCEPT_ORDER; - } - if (this.MustKillGatherTarget(msg.data.target)) { // Make sure we can attack the target, else we'll get very stuck @@ -534,6 +527,13 @@ return ACCEPT_ORDER; } + // If the unit is full go to the nearest dropsite instead of trying to gather. + if (!cmpResourceGatherer.CanCarryMore(msg.data.type.generic)) + { + this.SetNextState("INDIVIDUAL.GATHER.RETURNINGRESOURCE"); + return ACCEPT_ORDER; + } + this.RememberTargetPosition(); if (!msg.data.initPos) msg.data.initPos = msg.data.lastPos;