Fix Jaunting/Polymorph while Nodecrawling (#6400)
* Disable polymorph while ventcrawling * Actually, allow but remove from vent * update comments
This commit is contained in:
parent
398e3eb75f
commit
e7869d8221
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue