This commit is contained in:
libccy 2017-11-13 15:40:07 +08:00
parent 56a88c9105
commit 4b56fca392
1 changed files with 11 additions and 1 deletions

View File

@ -21724,7 +21724,9 @@
lib.config.recentIP.remove(_status.ip); lib.config.recentIP.remove(_status.ip);
lib.config.recentIP.unshift(_status.ip); lib.config.recentIP.unshift(_status.ip);
lib.config.recentIP.splice(5); lib.config.recentIP.splice(5);
game.saveConfig('reconnect_info',[_status.ip,null]); if(!lib.config.reconnect_info||lib.config.reconnect_info[0]!=_status.ip){
game.saveConfig('reconnect_info',[_status.ip,null]);
}
game.saveConfig('recentIP',lib.config.recentIP); game.saveConfig('recentIP',lib.config.recentIP);
_status.connectMode=true; _status.connectMode=true;
@ -21771,6 +21773,8 @@
lib.message.client.updaterooms(list,clients); lib.message.client.updaterooms(list,clients);
lib.message.client.updateevents(events); lib.message.client.updateevents(events);
ui.exitroom=ui.create.system('退出房间',function(){ ui.exitroom=ui.create.system('退出房间',function(){
game.saveConfig('tmp_owner_roomId');
game.saveConfig('tmp_user_roomId');
if(ui.rooms){ if(ui.rooms){
game.saveConfig('reconnect_info'); game.saveConfig('reconnect_info');
} }
@ -37903,6 +37907,8 @@
game.send('startGame'); game.send('startGame');
} }
else{ else{
game.saveConfig('tmp_owner_roomId');
game.saveConfig('tmp_user_roomId');
game.saveConfig('reconnect_info'); game.saveConfig('reconnect_info');
game.reload(); game.reload();
} }
@ -38517,6 +38523,10 @@
} }
} }
if(!ui.exit||!ui.exit.stay){ if(!ui.exit||!ui.exit.stay){
if(lib.config.reconnect_info){
lib.config.reconnect_info.length=1;
game.saveConfig('reconnect_info',lib.config.reconnect_info);
}
game.saveConfig('tmp_user_roomId',undefined,false,function(){ game.saveConfig('tmp_user_roomId',undefined,false,function(){
game.reload(); game.reload();
}); });