Self-attack nerfs (#17845)
This commit is contained in:
@@ -15,6 +15,14 @@ namespace Content.Shared.Weapons.Melee;
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MeleeWeaponComponent : Component
|
||||
{
|
||||
// TODO: This is becoming bloated as shit.
|
||||
// This should just be its own component for alt attacks.
|
||||
/// <summary>
|
||||
/// Does this entity do a disarm on alt attack.
|
||||
/// </summary>
|
||||
[DataField("altDisarm"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool AltDisarm = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should the melee weapon's damage stats be examinable.
|
||||
/// </summary>
|
||||
|
||||
@@ -460,6 +460,11 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
|
||||
case LightAttackEvent light:
|
||||
if (!Blocker.CanAttack(user, light.Target))
|
||||
return false;
|
||||
|
||||
// Can't self-attack if you're the weapon
|
||||
if (weaponUid == light.Target)
|
||||
return false;
|
||||
|
||||
break;
|
||||
case DisarmAttackEvent disarm:
|
||||
if (!Blocker.CanAttack(user, disarm.Target))
|
||||
|
||||
Reference in New Issue
Block a user