CyclicSet; commander task distribution; fixed AIScoutLocation

This commit is contained in:
Robert MacGregor 2015-06-27 20:43:20 -04:00
parent 088d7fee8e
commit 92007e9bc7
7 changed files with 218 additions and 37 deletions

View file

@ -125,18 +125,21 @@ function AIEnhancedScoutLocation::monitor(%task, %client)
// We're moving, or are near enough to our target
else
{
%pathDistance = %client.getPathDistance(%client.moveLocation);
// Don't move if we're close enough to our next node
if (%client.getPathDistance(%client.moveLocation) <= 40 && %client.isMoving)
if (%pathDistance <= 40 && %client.isMoving)
{
%client.isMoving = false;
%client.nextScoutRotation = getRandom(5000, 10000);
%client.scoutTime += 32;
}
else
else if(%client.getPathDistance(%client.moveLocation) > 40)
{
%client.isMoving = true;
%client.scoutTime = 0;
}
else
%client.scoutTime += 32;
// Wait a little bit at each node
if (%client.scoutTime >= %client.nextScoutRotation)