fix-alt click (#5977)

This commit is contained in:
Leon Friedrich
2022-01-01 16:16:45 +13:00
committed by GitHub
parent d6915b934f
commit d02b49b501

View File

@@ -156,23 +156,21 @@ namespace Content.Shared.Interaction
return; return;
} }
else
// We are close to the nearby object.
if (altInteract)
{ {
// We are close to the nearby object. // Perform alternative interactions, using context menu verbs.
if (altInteract) AltInteract(user, target.Value);
// Perform alternative interactions, using context menu verbs. }
AltInteract(user, target.Value); else if (!hands.TryGetActiveHeldEntity(out var heldEntity))
{
if (!hands.TryGetActiveHeldEntity(out var heldEntity)) // Since our hand is empty we will use InteractHand/Activate
{ InteractHand(user, target.Value);
// Since our hand is empty we will use InteractHand/Activate }
InteractHand(user, target.Value); else if (heldEntity != target)
} {
else if (heldEntity != target) await InteractUsing(user, heldEntity.Value, target.Value, coordinates);
{
await InteractUsing(user, heldEntity.Value, target.Value, coordinates);
}
} }
} }