Fixes creatures aggro range, Wrong check on pathpoints, and a crash when there is no unitCaster.

This commit is contained in:
hondacrx
2022-07-17 22:49:28 -04:00
parent abbd51bf8d
commit acb9db8891
4 changed files with 8 additions and 7 deletions
@@ -952,7 +952,7 @@ namespace Game.Movement
return;
// check if we even need to do anything
if ((_pathPoints[0] - target).LengthSquared() >= distSq)
if ((_pathPoints[_pathPoints.Length - 1] - target).LengthSquared() >= distSq)
return;
int i = _pathPoints.Length - 1;