1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-09 00:01:36 +02:00

apply 3d after adding the sound

This commit is contained in:
Ell 2021-01-30 22:26:44 +01:00
parent 5d9a5ecf13
commit 3a0e2354b3

View file

@ -79,9 +79,9 @@ namespace MLEM.Misc {
/// <returns>The passed instance, for chaining</returns>
public SoundEffectInstance Add(SoundEffectInstance instance, Action<SoundEffectInstance> onStopped = null, AudioEmitter emitter = null) {
var entry = new Entry(instance, onStopped, emitter);
entry.TryApply3D(this.listeners);
this.playingSounds.Add(entry);
instance.Play();
entry.TryApply3D(this.listeners);
return instance;
}