Fix npcs throwing themselves straight into space (#31118)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
using Content.Shared.Gravity;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.NPC;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Spawners;
|
||||
|
||||
namespace Content.Server.NPC.Pathfinding;
|
||||
|
||||
@@ -44,8 +47,7 @@ public sealed partial class PathfindingSystem
|
||||
var modifier = 1f;
|
||||
|
||||
// TODO
|
||||
if ((end.Data.Flags & PathfindingBreadcrumbFlag.Space) != 0x0 &&
|
||||
(!TryComp<GravityComponent>(end.GraphUid, out var gravity) || !gravity.Enabled))
|
||||
if ((end.Data.Flags & PathfindingBreadcrumbFlag.Space) != 0x0)
|
||||
{
|
||||
return 0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user