Make combat feel 100x better with this one simple trick (#8231)

This commit is contained in:
Kara
2022-05-17 02:57:28 -07:00
committed by GitHub
parent 8e78d509e7
commit 033efef5f5
6 changed files with 3 additions and 24 deletions

View File

@@ -192,7 +192,9 @@ namespace Content.Shared.Interaction
// TODO COMBAT Consider using alt-interact for advanced combat? maybe alt-interact disarms?
if (!altInteract && TryComp(user, out SharedCombatModeComponent? combatMode) && combatMode.IsInCombatMode)
{
DoAttack(user, coordinates, false, target);
// 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);
return;
}