Fix ghost actions not appearing (#15805)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user