Increase NPC chase persistence (#12850)
This commit is contained in:
@@ -243,11 +243,6 @@ namespace Content.Server.NPC.Systems
|
||||
|
||||
var direction = targetMap.Position - ourMap.Position;
|
||||
|
||||
if (steering.Owner == new EntityUid(15315))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Are we in range
|
||||
if (direction.Length <= arrivalDistance)
|
||||
{
|
||||
@@ -318,6 +313,12 @@ namespace Content.Server.NPC.Systems
|
||||
// TODO: Probably need partial planning support i.e. patch from the last node to where the target moved to.
|
||||
CheckPath(steering, xform, needsPath, distance);
|
||||
|
||||
if (steering.Pathfind && steering.CurrentPath.Count == 0)
|
||||
{
|
||||
SetDirection(mover, steering, Vector2.Zero, false);
|
||||
return;
|
||||
}
|
||||
|
||||
modifierQuery.TryGetComponent(steering.Owner, out var modifier);
|
||||
var moveSpeed = GetSprintSpeed(steering.Owner, modifier);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user