BFA Update (still lots of testing to do tho)

This commit is contained in:
hondacrx
2018-12-10 12:46:25 -05:00
parent 468b053946
commit 8e20114e10
256 changed files with 35613 additions and 10459 deletions
+17
View File
@@ -106,6 +106,23 @@ namespace Game.Combat
}
}
// delete all references out of specified range
public void deleteReferencesOutOfRange(float range)
{
HostileReference refe = getFirst();
range = range * range;
while (refe != null)
{
HostileReference nextRef = refe.next();
Unit owner = refe.GetSource().GetOwner();
if (!owner.isActiveObject() && owner.GetExactDist2dSq(getOwner()) > range)
{
refe.removeReference();
}
refe = nextRef;
}
}
public new HostileReference getFirst() { return ((HostileReference)base.getFirst()); }
public void updateThreatTables()