diff --git a/game/game.js b/game/game.js index e8858a476..87e5224d5 100755 --- a/game/game.js +++ b/game/game.js @@ -27,6 +27,10 @@ break; } } + if(window.location.href.indexOf('index.html?server')!=-1){ + window.isNonameServer=true; + window.indexedDB=null; + } }()); (function(){ @@ -3152,6 +3156,10 @@ lib.config.all.plays=[]; lib.config.all.mode=[]; + if(window.isNonameServer){ + lib.config.mode='connect'; + } + for(i in character.pack){ if(lib.config.hiddenCharacterPack.indexOf(i)==-1){ lib.config.all.characters.push(i); @@ -3909,7 +3917,10 @@ if(lib.config.mode=='connect'){ _status.connectMode=true; } - if(lib.config.cheat&&!lib.storage.test&&(!_status.connectMode||lib.config.debug)){ + if(window.isNonameServer){ + lib.cheat.i(); + } + else if(lib.config.cheat&&!lib.storage.test&&(!_status.connectMode||lib.config.debug)){ lib.cheat.i(); } lib.config.sort_card=get.sortCard(lib.config.sort); @@ -7132,6 +7143,7 @@ uninitOL:function(){ this.node.avatar.hide(); this.node.name.innerHTML=''; + this.node.identity.firstChild.innerHTML=''; delete this.nickname; delete this.avatar; }, @@ -11333,6 +11345,9 @@ delete game.connectPlayers[i].playerid; } } + if(game.onlinezhu==this.id){ + game.onlinezhu=null; + } game.updateWaiting(); } else if(lib.playerOL[this.id]){ @@ -12044,6 +12059,30 @@ player.unwait(result); } }, + changeRoomConfig:function(config){ + if(this.id==game.onlinezhu){ + game.broadcastAll(function(config){ + for(var i in config){ + lib.configOL[i]=config[i]; + } + },config); + if(lib.configOL.mode=='identity'&&lib.configOL.identity_mode=='zhong'&&game.connectPlayers){ + for(var i=0;i