repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 386f1ed13cf23fe00c6d3d4760b0a1583b26e5c8:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 386f1ed13cf23fe00c6d3d4760b0a1583b26e5c8
Author: James Baicoianu 
Date:   Sun Dec 24 04:44:38 2017 -0800

    Don't change skybox onload if room isn't active

diff --git a/scripts/room.js b/scripts/room.js
index c9b4cf0f19c673bf8af6b3194c2ba17026a91630..
index ..5ad07652b97a6ffd3312f235fca3b020a5378c7a 100644
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -274,7 +274,9 @@ elation.require([
           var texture = new THREE.CubeTexture( images );
           texture.needsUpdate = true;
           this.skyboxtexture = texture;
-          this.skybox.setTexture(this.skyboxtexture);
+          if (this.janus.currentroom === this) {
+            this.skybox.setTexture(this.skyboxtexture);
+          }
           return true;
         }
       }

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