repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 73404a34cb8e94a7527650f0b485d38a785c3a22:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 73404a34cb8e94a7527650f0b485d38a785c3a22
Author: James Baicoianu 
Date:   Thu Oct 19 21:03:41 2017 -0700

    Pass parent when spawning child, handle positionless objects (eg, sounds)

diff --git a/scripts/room.js b/scripts/room.js
index 7232c08c01a0c392628dbd3075129c4b7dde910d..
index ..82ecdaa9ac47e4d521f6ce277c8c92f5216095d1 100644
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -810,8 +810,14 @@ elation.require([
         'color': args.col,
         'pickable': true,
         'collidable': true,
+        'parent': parentobj,
         'shadows': args.shadows || this.shadows
       };
+      if (!args.pos) {
+        args.pos = [0,0,0];
+        objectargs.position = [0,0,0];
+        objectargs.hasposition = false;
+      }
       elation.utils.merge(args, objectargs);

       switch (realtype) {

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