Merge pull request #1362 from paulkaplan/fix-duplicate-sound

Fix duplicating sounds not working
This commit is contained in:
Paul Kaplan 2018-07-18 09:03:03 -04:00 committed by GitHub
commit 13c6c4f9d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,7 @@ class Sprite {
newSprite.sounds = this.sounds.map(sound => {
const newSound = Object.assign({}, sound);
const soundAsset = this.runtime.storage.get(sound.assetId);
assetPromises.push(loadSoundFromAsset(newSound, soundAsset, this.runtime, this));
assetPromises.push(loadSoundFromAsset(newSound, soundAsset, this.runtime, newSprite));
return newSound;
});