]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Use hitsound for 0 damage weapons (#14508)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Thu, 9 Mar 2023 08:28:57 +0000 (19:28 +1100)
committerGitHub <noreply@github.com>
Thu, 9 Mar 2023 08:28:57 +0000 (00:28 -0800)
Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs

index 362756a52c59b1b98f7e34dfd594fc429e3f9065..a96699260ecd5ce9054f5ac6589e7202868662f9 100644 (file)
@@ -463,6 +463,10 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
             {
                 Audio.PlayPredicted(hitEvent.HitSoundOverride, meleeUid, user);
             }
+            else if (component.Damage.Total.Equals(FixedPoint2.Zero) && component.HitSound != null)
+            {
+                Audio.PlayPredicted(component.HitSound, meleeUid, user);
+            }
             else
             {
                 Audio.PlayPredicted(component.NoDamageSound, meleeUid, user);