From 44dcfed5c067caaf953892c26106f6b6f7843c89 Mon Sep 17 00:00:00 2001 From: Code WvS Date: Sun, 8 Mar 2015 14:50:18 +0100 Subject: clone markers correctly --- objects.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'objects.js') diff --git a/objects.js b/objects.js index a1b28bc..4917ad7 100644 --- a/objects.js +++ b/objects.js @@ -1502,6 +1502,8 @@ SpriteMorph.prototype.fullCopy = function () { dp.rotatesWithAnchor = part.rotatesWithAnchor; c.attachPart(dp); }); + // makes updateMarker() create a new marker + c.marker = null; return c; }; @@ -2856,6 +2858,7 @@ SpriteMorph.prototype.clonify = function (stage) { SpriteMorph.prototype.removeClone = function () { if (this.isClone) { // this.stopTalking(); + window.spriteGroup.removeLayer(this.marker); this.parent.threads.stopAllForReceiver(this); this.destroy(); this.parent.cloneCount -= 1; -- cgit v1.3.1