From 250a97ae6fdc61001c891103981bfc55e0649914 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Wed, 26 Apr 2023 16:05:04 +1200 Subject: [PATCH] Fix ghost actions not appearing (#15805) --- Content.Client/Actions/ActionsSystem.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index db484df882..9e594260f3 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -129,9 +129,6 @@ namespace Content.Client.Actions public override void AddAction(EntityUid uid, ActionType action, EntityUid? provider, ActionsComponent? comp = null, bool dirty = true) { - if (uid != _playerManager.LocalPlayer?.ControlledEntity) - return; - if (GameTiming.ApplyingState && !action.ClientExclusive) return; @@ -140,14 +137,13 @@ namespace Content.Client.Actions dirty &= !action.ClientExclusive; base.AddAction(uid, action, provider, comp, dirty); - ActionAdded?.Invoke(action); + + if (uid == _playerManager.LocalPlayer?.ControlledEntity) + ActionAdded?.Invoke(action); } public override void RemoveAction(EntityUid uid, ActionType action, ActionsComponent? comp = null, bool dirty = true) { - if (uid != _playerManager.LocalPlayer?.ControlledEntity) - return; - if (GameTiming.ApplyingState && !action.ClientExclusive) return; @@ -157,7 +153,7 @@ namespace Content.Client.Actions dirty &= !action.ClientExclusive; base.RemoveAction(uid, action, comp, dirty); - if (action.AutoRemove) + if (action.AutoRemove && uid == _playerManager.LocalPlayer?.ControlledEntity) ActionRemoved?.Invoke(action); } -- 2.51.2