repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 4d77dc848bf19301c50ad9beb1ffed68c4eff84a:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 4d77dc848bf19301c50ad9beb1ffed68c4eff84a
Author: James Baicoianu 
Date:   Wed Jan 31 22:53:17 2018 -0800

    Party mode support

diff --git a/scripts/multiplayermanager.js b/scripts/multiplayermanager.js
index 49ac44ae45c1d11fd4bbb7c78672ed262663636f..
index ..32b129637296fdf9701eb1da34d5121c7b038b3e 100644
--- a/scripts/multiplayermanager.js
+++ b/scripts/multiplayermanager.js
@@ -159,7 +159,8 @@ console.log('[MultiplayerManager] set active room:', room, this.activeroom);
       // Tell the server we're now in the new room
       this.activeroom = room;
       var server = this.getServerForRoom(room);
-      server.enter_room(room.url);
+      var partymode = this.player.party_mode && room.party_mode;
+      server.enter_room(room.url, partymode);
     }
     this.getJanusOrientation = (function() { 
       var tmpMat = new THREE.Matrix4(),
@@ -290,7 +291,8 @@ console.log('[MultiplayerManager] unsubscribe', room.url);

 console.log('[MultiplayerManager] join', room.url);
       var server = this.getServerForRoom(room);
-      server.enter_room(room.url);
+      var partymode = this.player.party_mode && room.party_mode;
+      server.enter_room(room.url, partymode);
     }
     this.part = function(room) {
       if (!this.enabled) return;

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