repo: janusweb action: commit revision: path_from: revision_from: 73404a34cb8e94a7527650f0b485d38a785c3a22: path_to: revision_to:
commit 73404a34cb8e94a7527650f0b485d38a785c3a22 Author: James BaicoianuDate: 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
--- 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-----