From 3bb455dae5f6a9a2dc9f2f63d31fb55aafb3e9e0 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Tue, 17 Jul 2018 16:50:40 -0400 Subject: [PATCH] Duplicating a sprite copied the sounds into the original, not the new --- src/sprites/sprite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sprites/sprite.js b/src/sprites/sprite.js index bc61960a0..fa24f8d77 100644 --- a/src/sprites/sprite.js +++ b/src/sprites/sprite.js @@ -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; });