From 3ade3bab99a23ca1ae3e043ada1804cc52238161 Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 18 Apr 2016 11:13:31 +0800 Subject: [PATCH] x --- game/game.js | 75 ++++++++++++++++++++++++++++++++++++++----------- game/phantom.js | 15 ++++++++++ game/server.js | 17 ++--------- 3 files changed, 77 insertions(+), 30 deletions(-) diff --git a/game/game.js b/game/game.js index 068f8e26b..a9c49ebff 100755 --- a/game/game.js +++ b/game/game.js @@ -27,9 +27,8 @@ break; } } - var index=window.location.href.indexOf('index.html?server='); - if(index!=-1){ - window.isNonameServer=window.location.href.slice(index+18); + if(window.location.href.indexOf('index.html?server')!=-1){ + window.isNonameServer=true; window.indexedDB=null; } }()); @@ -11431,8 +11430,13 @@ delete _status.connectCallback; } if(game.online||game.onlineroom){ - localStorage.setItem(lib.configprefix+'directstart',true); - game.reload(); + if(game.servermode&&_status.over){ + game.saveConfig('reconnect_room',game.roomId); + } + else{ + localStorage.setItem(lib.configprefix+'directstart',true); + game.reload(); + } } else{ game.saveConfig('reconnect_info'); @@ -12053,7 +12057,7 @@ break; } } - this.send('init',this.id,lib.configOL,game.ip); + this.send('init',this.id,lib.configOL,game.ip,window.isNonameServer,game.roomId); } }, inited:function(){ @@ -12163,8 +12167,28 @@ // func.apply(this,args); // } }, + log:function(){ + var items=[]; + try{ + for(var i=0;i