From 24544a16ae72121621b2c59a4553047cc089eae2 Mon Sep 17 00:00:00 2001 From: libccy Date: Mon, 13 Nov 2017 16:30:03 +0800 Subject: [PATCH] f --- game/game.js | 16 ++++++++++++++-- layout/default/layout.css | 2 +- mode/connect.js | 3 +++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/game/game.js b/game/game.js index 9247d3f40..1023d81e0 100644 --- a/game/game.js +++ b/game/game.js @@ -21842,8 +21842,18 @@ } } else if(typeof game.roomId=='number'){ - ui.create.connecting(); - game.send('server','enter',game.roomId,lib.config.connect_nickname,lib.config.connect_avatar); + var room=ui.rooms[game.roomId]; + if(game.roomIdServer&&(room.serving||!room.version)){ + console.log(); + if(lib.config.reconnect_info){ + lib.config.reconnect_info[2]=null; + game.saveConfig('reconnect_info',lib.config.reconnect_info); + } + } + else{ + ui.create.connecting(); + game.send('server','enter',game.roomId,lib.config.connect_nickname,lib.config.connect_avatar); + } } lib.init.onfree(); } @@ -38516,6 +38526,8 @@ lib.config.reconnect_info[2]=game.roomId; game.saveConfig('reconnect_info',lib.config.reconnect_info); } + game.reload(); + return; } else{ if(typeof game.roomId!='number'){ diff --git a/layout/default/layout.css b/layout/default/layout.css index 1e13f9a89..805617c3e 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -580,7 +580,7 @@ table { .player.linked:not(.treasure).playerfocus { transform: scale(1.1) rotate(-90deg); } -.player.connect>div:not(.avatar):not(.name):not(.nameol):not(.hp.room):not(.gaming) { +.player.connect>div:not(.avatar):not(.name):not(.nameol):not(.hp):not(.room):not(.gaming):not(.identity) { display: none !important; } .player.connect>.gaming { diff --git a/mode/connect.js b/mode/connect.js index e0edd9dff..3fab28e6c 100644 --- a/mode/connect.js +++ b/mode/connect.js @@ -121,6 +121,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var info=lib.config.reconnect_info; game.onlineID=info[1]; game.roomId=info[2]; + if(typeof game.roomId=='number'){ + game.roomIdServer=true; + } var n=5; var connect=function(){ event.textnode.innerHTML='正在连接...';