Fix ghost actions not appearing (#15805)

This commit is contained in:
Leon Friedrich
2023-04-26 16:05:04 +12:00
committed by GitHub
parent 4e7cea96de
commit 250a97ae6f

View File

@@ -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);
}