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.
|
||||
else
|
||||
{
|
||||
arrivalDistance = SharedInteractionSystem.InteractionRange - 0.65f;
|
||||
arrivalDistance = SharedInteractionSystem.InteractionRange - 0.05f;
|
||||
}
|
||||
|
||||
// Check if mapids match.
|
||||
@@ -126,6 +126,12 @@ public sealed partial class NPCSteeringSystem
|
||||
// Breaking behaviours and the likes.
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ using Robust.Shared.Threading;
|
||||
using Robust.Shared.Timing;
|
||||
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
|
||||
{
|
||||
/*
|
||||
* We use context steering to determine which way to move.
|
||||
* This involves creating an array of possible directions and assigning a value for the desireability of each direction.
|
||||
@@ -476,5 +476,4 @@ namespace Content.Server.NPC.Systems
|
||||
|
||||
return modifier.CurrentSprintSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user