1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-25 17:59:24 +01: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> /// <returns>The passed instance, for chaining</returns>
public SoundEffectInstance Add(SoundEffectInstance instance, Action<SoundEffectInstance> onStopped = null, AudioEmitter emitter = null) { public SoundEffectInstance Add(SoundEffectInstance instance, Action<SoundEffectInstance> onStopped = null, AudioEmitter emitter = null) {
var entry = new Entry(instance, onStopped, emitter); var entry = new Entry(instance, onStopped, emitter);
entry.TryApply3D(this.listeners);
this.playingSounds.Add(entry); this.playingSounds.Add(entry);
instance.Play(); instance.Play();
entry.TryApply3D(this.listeners);
return instance; return instance;
} }