NPC obstacle fixes (#15645)
This commit is contained in:
@@ -98,7 +98,7 @@ public sealed partial class NPCSteeringSystem
|
|||||||
// TODO: Consider melee range or the likes.
|
// TODO: Consider melee range or the likes.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
arrivalDistance = SharedInteractionSystem.InteractionRange - 0.65f;
|
arrivalDistance = SharedInteractionSystem.InteractionRange - 0.05f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if mapids match.
|
// Check if mapids match.
|
||||||
@@ -126,6 +126,12 @@ public sealed partial class NPCSteeringSystem
|
|||||||
// Breaking behaviours and the likes.
|
// Breaking behaviours and the likes.
|
||||||
lock (_obstacles)
|
lock (_obstacles)
|
||||||
{
|
{
|
||||||
|
// We're still coming to a stop so wait for the do_after.
|
||||||
|
if (body.LinearVelocity.LengthSquared > 0.01f)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
status = TryHandleFlags(uid, steering, node, bodyQuery);
|
status = TryHandleFlags(uid, steering, node, bodyQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ using Robust.Shared.Threading;
|
|||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
|
|
||||||
namespace Content.Server.NPC.Systems
|
namespace Content.Server.NPC.Systems;
|
||||||
{
|
|
||||||
public sealed partial class NPCSteeringSystem : SharedNPCSteeringSystem
|
public sealed partial class NPCSteeringSystem : SharedNPCSteeringSystem
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -477,4 +477,3 @@ namespace Content.Server.NPC.Systems
|
|||||||
return modifier.CurrentSprintSpeed;
|
return modifier.CurrentSprintSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user