Melee refactor (#10897)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -198,12 +198,9 @@ namespace Content.Shared.Interaction
|
||||
if (target != null && Deleted(target.Value))
|
||||
return;
|
||||
|
||||
// TODO COMBAT Consider using alt-interact for advanced combat? maybe alt-interact disarms?
|
||||
if (!altInteract && TryComp(user, out SharedCombatModeComponent? combatMode) && combatMode.IsInCombatMode)
|
||||
if (TryComp(user, out SharedCombatModeComponent? combatMode) && combatMode.IsInCombatMode)
|
||||
{
|
||||
// Wide attack if there isn't a target or the target is out of range, click attack otherwise.
|
||||
var shouldWideAttack = target == null || !InRangeUnobstructed(user, target.Value);
|
||||
DoAttack(user, coordinates, shouldWideAttack, target);
|
||||
// Eat the input
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -300,12 +297,6 @@ namespace Content.Shared.Interaction
|
||||
checkAccess: false);
|
||||
}
|
||||
|
||||
public virtual void DoAttack(EntityUid user, EntityCoordinates coordinates, bool wideAttack,
|
||||
EntityUid? targetUid = null)
|
||||
{
|
||||
// TODO PREDICTION move server-side interaction logic into the shared system for interaction prediction.
|
||||
}
|
||||
|
||||
public void InteractUsingRanged(EntityUid user, EntityUid used, EntityUid? target,
|
||||
EntityCoordinates clickLocation, bool inRangeUnobstructed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user