Fix SpawnItemsOnUse not playing sound (#27621)
Made SpamItemsOnUse play sound at entity coordinates instead of parenting
This commit is contained in:
parent
8909dc7d40
commit
9b17693396
1 changed files with 3 additions and 1 deletions
|
|
@ -82,7 +82,9 @@ namespace Content.Server.Storage.EntitySystems
|
|||
|
||||
if (component.Sound != null)
|
||||
{
|
||||
_audio.PlayPvs(component.Sound, uid);
|
||||
// The entity is often deleted, so play the sound at its position rather than parenting
|
||||
var coordinates = Transform(uid).Coordinates;
|
||||
_audio.PlayPvs(component.Sound, coordinates);
|
||||
}
|
||||
|
||||
component.Uses--;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue