repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 1ac69e2c2fc67cc00bd00d07282aefc805baae5d:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 1ac69e2c2fc67cc00bd00d07282aefc805baae5d
Author: James Baicoianu 
Date:   Thu Sep 26 15:01:59 2024 -0700

    Use parent object's id to create unique object IDs when spawned

diff --git a/scripts/room.js b/scripts/room.js
index 4828c907efc3cdb914c622b69ef179457c00e87c..
index ..5aa436c4861b9282c54bbb3b88cd385c21910552 100644
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -1374,7 +1374,7 @@ elation.require([
       if (this.jsobjects[objectargs.js_id]) {
         objectargs.js_id = objectargs.js_id + '_' + window.uniqueId();
       }
-      var object = parentobj.spawn(realtype, this.roomid + '_' + objectargs.js_id, objectargs),
+      var object = parentobj.spawn(realtype, (parentobj.js_id || room.roomid) + '_' + objectargs.js_id, objectargs),
           proxyobj = object.getProxyObject(customElement);
       if (proxyobj && objectargs.js_id && !objectargs.isinternal && (parentobj == this || 'js_id' in args)) {
         this.jsobjects[objectargs.js_id] = proxyobj;

-----END OF PAGE-----