Skip to content

Commit

Permalink
fix pie throwing sound not playing (#33017)
Browse files Browse the repository at this point in the history
  • Loading branch information
slarticodefast authored and PuroSlavKing committed Dec 25, 2024
1 parent ab89ff5 commit 536f5df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit 536f5df

Please sign in to comment.