]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix pie throwing sound not playing (#33017)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Sun, 27 Oct 2024 04:25:54 +0000 (05:25 +0100)
committerGitHub <noreply@github.com>
Sun, 27 Oct 2024 04:25:54 +0000 (15:25 +1100)
Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs

index a38e3636035baa28761f83972b3a84b56341c671..2ff94760f6bfc8bff0fe9de7515106922feb1da4 100644 (file)
@@ -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))
             {