Use hitsound for 0 damage weapons (#14508)

This commit is contained in:
metalgearsloth 2023-03-09 19:28:57 +11:00 committed by GitHub
parent 2aa495a922
commit f9aaadcfc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View 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);