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