From 536f5df72e2284cfbdfeae8382723b9d8838e5e0 Mon Sep 17 00:00:00 2001 From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Sun, 27 Oct 2024 05:25:54 +0100 Subject: [PATCH] fix pie throwing sound not playing (#33017) --- Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs index a28679ddbc..02f938a7ab 100644 --- a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs @@ -40,7 +40,9 @@ public override void Initialize() protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie) { - _audio.PlayPvs(_audio.GetSound(creamPie.Sound), uid, AudioParams.Default.WithVariation(0.125f)); + // The entity is deleted, so play the sound at its position rather than parenting + var coordinates = Transform(uid).Coordinates; + _audio.PlayPvs(_audio.GetSound(creamPie.Sound), coordinates, AudioParams.Default.WithVariation(0.125f)); if (EntityManager.TryGetComponent(uid, out FoodComponent? foodComp)) {