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

@ -13,6 +13,14 @@ function sameSide(%p1, %p2, %a, %b)
return false;
}
function SimSet::contains(%this, %contained)
{
for (%iteration = 0; %iteration < %this.getCount(); %iteration++)
if (%this.getObject(%iteration) == %contained)
return true;
return false;
}
function pointInTriangle(%point, %a, %b, %c)
{
if (sameSide(%point, %a, %b, %c) && sameSide(%point, %b, %a, %c) && sameSide(%point, %c, %a, %b))