From 7bd58a441ac214655529e9adab0a275eacf08abb Mon Sep 17 00:00:00 2001 From: drdth Date: Wed, 15 Jan 2025 07:39:02 +0300 Subject: [PATCH] review requested changes --- Content.Server/_Sunrise/CritHeartbeat/CritHeartbeatSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/_Sunrise/CritHeartbeat/CritHeartbeatSystem.cs b/Content.Server/_Sunrise/CritHeartbeat/CritHeartbeatSystem.cs index fd42cd585f9..c51dda5eebe 100644 --- a/Content.Server/_Sunrise/CritHeartbeat/CritHeartbeatSystem.cs +++ b/Content.Server/_Sunrise/CritHeartbeat/CritHeartbeatSystem.cs @@ -32,7 +32,7 @@ private void OnDamage(Entity ent, ref DamageChangedEvent if (!ent.Comp.Enabled) return; - if (ent.Comp.AudioStream == null) + if (ent.Comp.AudioStream == null || !Exists(ent.Comp.AudioStream)) return; var pitch = Math.Min(1, 100 / args.Damageable.TotalDamage.Float());