]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Stop shift from cancelling follow as ghost (#24715)
authorTayrtahn <tayrtahn@gmail.com>
Tue, 30 Jan 2024 01:33:34 +0000 (20:33 -0500)
committerGitHub <noreply@github.com>
Tue, 30 Jan 2024 01:33:34 +0000 (17:33 -0800)
Fixed pressing shift cancelling ghost follow

Content.Shared/Follower/FollowerSystem.cs

index 41ee215fe253075b223e863de1721ac2c7e508e4..672f3d6487c020d2465ae2e7956990e0d06bd338 100644 (file)
@@ -4,6 +4,7 @@ using Content.Shared.Follower.Components;
 using Content.Shared.Ghost;
 using Content.Shared.Hands;
 using Content.Shared.Movement.Events;
+using Content.Shared.Movement.Systems;
 using Content.Shared.Physics.Pull;
 using Content.Shared.Tag;
 using Content.Shared.Verbs;
@@ -96,7 +97,8 @@ public sealed class FollowerSystem : EntitySystem
 
     private void OnFollowerMove(EntityUid uid, FollowerComponent component, ref MoveInputEvent args)
     {
-        StopFollowingEntity(uid, component.Following);
+        if ((args.Component.HeldMoveButtons & MoveButtons.AnyDirection) != MoveButtons.None)
+            StopFollowingEntity(uid, component.Following);
     }
 
     private void OnPullStarted(EntityUid uid, FollowerComponent component, PullStartedMessage args)