Optionally deserialize AudioParams in SoundSpecifier (#8065)

This commit is contained in:
Kara
2022-05-12 16:41:33 -07:00
committed by GitHub
parent 78e9ee48ee
commit 9217cc02af
3 changed files with 11 additions and 4 deletions

View File

@@ -199,7 +199,7 @@ public abstract partial class InventorySystem
filter.RemoveWhereAttachedEntity(entity => entity == actor);
}
SoundSystem.Play(filter, item.EquipSound.GetSound(), target, AudioParams.Default.WithVolume(-2f));
SoundSystem.Play(filter, item.EquipSound.GetSound(), target, item.EquipSound.Params.WithVolume(-2f));
}
inventory.Dirty();
@@ -378,7 +378,7 @@ public abstract partial class InventorySystem
filter.RemoveWhereAttachedEntity(entity => entity == actor);
}
SoundSystem.Play(filter, item.UnequipSound.GetSound(), target, AudioParams.Default.WithVolume(-2f));
SoundSystem.Play(filter, item.UnequipSound.GetSound(), target, item.UnequipSound.Params.WithVolume(-2f));
}
inventory.Dirty();