removed TryGetSound + made some SoundSpecifier datafields required

This commit is contained in:
Galactic Chimp
2021-07-31 19:52:33 +02:00
parent 8ff703c338
commit 57016d14b4
114 changed files with 519 additions and 785 deletions

View File

@@ -34,8 +34,7 @@ namespace Content.Server.Damage
if (speed < component.MinimumSpeed) return;
if (component.SoundHit.TryGetSound(out var soundHit))
SoundSystem.Play(Filter.Pvs(otherBody), soundHit, otherBody, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
SoundSystem.Play(Filter.Pvs(otherBody), component.SoundHit.GetSound(), otherBody, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
if ((_gameTiming.CurTime - component.LastHit).TotalSeconds < component.DamageCooldown)
return;