Misc action fixes (#12046)
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
@@ -180,24 +180,18 @@ namespace Content.Client.Actions
|
||||
|
||||
private void OnPlayerAttached(EntityUid uid, ActionsComponent component, PlayerAttachedEvent args)
|
||||
{
|
||||
if (uid != _playerManager.LocalPlayer?.ControlledEntity)
|
||||
return;
|
||||
|
||||
LinkAllActions(component);
|
||||
}
|
||||
|
||||
private void OnPlayerDetached(EntityUid uid, ActionsComponent component, PlayerDetachedEvent? args = null)
|
||||
{
|
||||
if (uid != _playerManager.LocalPlayer?.ControlledEntity)
|
||||
return;
|
||||
|
||||
UnlinkAllActions();
|
||||
}
|
||||
|
||||
public void UnlinkAllActions()
|
||||
{
|
||||
UnlinkActions?.Invoke();
|
||||
PlayerActions = null;
|
||||
UnlinkActions?.Invoke();
|
||||
}
|
||||
|
||||
public void LinkAllActions(ActionsComponent? actions = null)
|
||||
|
||||
Reference in New Issue
Block a user