Fix Jaunting/Polymorph while Nodecrawling (#6400)

* Disable polymorph while ventcrawling

* Actually, allow but remove from vent

* update comments
This commit is contained in:
Vanessa 2026-08-09 11:57:32 -05:00 committed by GitHub
parent 398e3eb75f
commit e7869d8221
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -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<NodeCrawlerComponent, InhaleLocationEvent>(OnInhaleLocation);
SubscribeLocalEvent<NodeCrawlerComponent, ExhaleLocationEvent>(OnExhaleLocation);
SubscribeLocalEvent<NodeCrawlerComponent, AtmosExposedGetAirEvent>(OnGetAir);
SubscribeLocalEvent<NodeCrawlerComponent, PolymorphActionEvent>(OnPolymorph);
SubscribeLocalEvent<NodeCrawlerComponent, EntityZombifiedEvent>(OnZombify);
}
@ -222,4 +224,15 @@ public sealed class NodeCrawlSystem : SharedNodeCrawlSystem
ent.Comp.EnterDelay = ent.Comp.ZombieEnterDelay;
Dirty(ent);
}
/// <summary>
/// Exit on polymorph or else the entity's movement bugs out.
/// </summary>
/// <param name="ent"></param>
/// <param name="args"></param>
private void OnPolymorph(Entity<NodeCrawlerComponent> ent, ref PolymorphActionEvent args)
{
if (ent.Comp.Mover.HasValue)
ExitNodeCrawl(ent);
}
}