From 301254fef8d9837e2781dcd665f3c6d5f855b348 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 30 Sep 2022 02:46:54 +1000 Subject: [PATCH] Only show disarm fail if target is a mob (#11603) --- Content.Client/Weapons/Melee/MeleeWeaponSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs index ff04d3fc41..99600b93b2 100644 --- a/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs +++ b/Content.Client/Weapons/Melee/MeleeWeaponSystem.cs @@ -2,6 +2,7 @@ using Content.Client.CombatMode; using Content.Client.Gameplay; using Content.Client.Hands; using Content.Client.Weapons.Melee.Components; +using Content.Shared.MobState.Components; using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Melee.Events; using Robust.Client.Animations; @@ -207,7 +208,7 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem // If target doesn't have hands then we can't disarm so will let the player know it's pointless. if (!HasComp(ev.Target!.Value)) { - if (Timing.IsFirstTimePredicted) + if (Timing.IsFirstTimePredicted && HasComp(ev.Target.Value)) PopupSystem.PopupEntity(Loc.GetString("disarm-action-disarmable", ("targetName", ev.Target.Value)), ev.Target.Value, Filter.Local()); return false;