diff --git a/Content.Server/_DV/NodeCrawl/NodeCrawlSystem.cs b/Content.Server/_DV/NodeCrawl/NodeCrawlSystem.cs index 639ad34ca7a..9305f0ec34f 100644 --- a/Content.Server/_DV/NodeCrawl/NodeCrawlSystem.cs +++ b/Content.Server/_DV/NodeCrawl/NodeCrawlSystem.cs @@ -8,6 +8,7 @@ using Content.Server.NodeContainer.Nodes; using Content.Shared._DV.NodeCrawl; using Content.Shared.Atmos; using Content.Shared.NodeContainer; +using Content.Shared.Polymorph; using Content.Shared.Zombies; using Robust.Shared.Reflection; using Robust.Shared.Utility; @@ -30,6 +31,7 @@ public sealed class NodeCrawlSystem : SharedNodeCrawlSystem SubscribeLocalEvent(OnInhaleLocation); SubscribeLocalEvent(OnExhaleLocation); SubscribeLocalEvent(OnGetAir); + SubscribeLocalEvent(OnPolymorph); SubscribeLocalEvent(OnZombify); } @@ -222,4 +224,15 @@ public sealed class NodeCrawlSystem : SharedNodeCrawlSystem ent.Comp.EnterDelay = ent.Comp.ZombieEnterDelay; Dirty(ent); } + + /// + /// Exit on polymorph or else the entity's movement bugs out. + /// + /// + /// + private void OnPolymorph(Entity ent, ref PolymorphActionEvent args) + { + if (ent.Comp.Mover.HasValue) + ExitNodeCrawl(ent); + } }