From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Sun, 27 Oct 2024 04:25:54 +0000 (+0100) Subject: fix pie throwing sound not playing (#33017) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4252fdffb91050e375ac197067f7dcde09e7b168;p=space-station-14.git fix pie throwing sound not playing (#33017) --- diff --git a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs index a38e363603..2ff94760f6 100644 --- a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs @@ -41,7 +41,9 @@ namespace Content.Server.Nutrition.EntitySystems 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)) {