Skip to content

Commit 4252fdf

Browse files
fix pie throwing sound not playing (space-wizards#33017)
1 parent 6486cdf commit 4252fdf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public override void Initialize()
4141

4242
protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie)
4343
{
44-
_audio.PlayPvs(_audio.GetSound(creamPie.Sound), uid, AudioParams.Default.WithVariation(0.125f));
44+
// The entity is deleted, so play the sound at its position rather than parenting
45+
var coordinates = Transform(uid).Coordinates;
46+
_audio.PlayPvs(_audio.GetSound(creamPie.Sound), coordinates, AudioParams.Default.WithVariation(0.125f));
4547

4648
if (EntityManager.TryGetComponent(uid, out FoodComponent? foodComp))
4749
{

0 commit comments

Comments
 (0)