Fixes falling though map when using charge on a hill.
This commit is contained in:
@@ -991,7 +991,7 @@ namespace Game.Movement
|
||||
// ok, _pathPoints[i] is too close, _pathPoints[i-1] is not, so our target point is somewhere between the two...
|
||||
// ... settle for a guesstimate since i'm not confident in doing trig on every chase motion tick...
|
||||
// (@todo review this)
|
||||
_pathPoints[i] += (_pathPoints[i - 1] - _pathPoints[i]).directionOrZero() * (dist - (_pathPoints[i] - target).Length());
|
||||
_pathPoints[i] += (_pathPoints[i - 1] - _pathPoints[i]).direction() * (dist - (_pathPoints[i] - target).Length());
|
||||
Array.Resize(ref _pathPoints, i + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user