Fix followers getting sent to nullspace when target is polymorphed (#33878)
* Add an event for polymorph actions * Subscribe FollowerSystem to the event * Add check that unfollow target is actually current target. * Make followers try to follow on state update; Dirty follower on follow.
This commit is contained in:
10
Content.Shared/Polymorph/PolymorphEvents.cs
Normal file
10
Content.Shared/Polymorph/PolymorphEvents.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Content.Shared.Polymorph;
|
||||
|
||||
/// <summary>
|
||||
/// Raised locally on an entity when it polymorphs into another entity
|
||||
/// </summary>
|
||||
/// <param name="OldEntity">EntityUid of the entity before the polymorph</param>
|
||||
/// <param name="NewEntity">EntityUid of the entity after the polymorph</param>
|
||||
/// <param name="IsRevert">Whether this polymorph event was a revert back to the original entity</param>
|
||||
[ByRefEvent]
|
||||
public record struct PolymorphedEvent(EntityUid OldEntity, EntityUid NewEntity, bool IsRevert);
|
||||
Reference in New Issue
Block a user