修复创房间的人“当前场景”状态有问题导致别人退房的时候操作不能正确执行
This commit is contained in:
@@ -439,9 +439,9 @@ end
|
|||||||
|
|
||||||
--Remove player when leave
|
--Remove player when leave
|
||||||
local function _playerLeaveRoom(uid)
|
local function _playerLeaveRoom(uid)
|
||||||
for i=1,#PLAYERS do if PLAYERS[i].uid==uid then table.remove(PLAYERS,i) break end end
|
|
||||||
for i=1,#PLY_ALIVE do if PLY_ALIVE[i].uid==uid then table.remove(PLY_ALIVE,i) break end end
|
|
||||||
if SCN.stack[#SCN.stack]=='net_game' then
|
if SCN.stack[#SCN.stack]=='net_game' then
|
||||||
|
for i=1,#PLAYERS do if PLAYERS[i].uid==uid then table.remove(PLAYERS,i) break end end
|
||||||
|
for i=1,#PLY_ALIVE do if PLY_ALIVE[i].uid==uid then table.remove(PLY_ALIVE,i) break end end
|
||||||
if uid==USER.uid then
|
if uid==USER.uid then
|
||||||
SCN.backTo('net_menu')
|
SCN.backTo('net_menu')
|
||||||
else
|
else
|
||||||
@@ -596,8 +596,8 @@ function NET.wsCallBack.room_chat(body)
|
|||||||
end
|
end
|
||||||
function NET.wsCallBack.room_create(body)
|
function NET.wsCallBack.room_create(body)
|
||||||
MES.new('check',text.createRoomSuccessed)
|
MES.new('check',text.createRoomSuccessed)
|
||||||
NET.wsCallBack.room_enter(body)
|
|
||||||
SCN.pop()
|
SCN.pop()
|
||||||
|
NET.wsCallBack.room_enter(body)
|
||||||
WAIT.interrupt()
|
WAIT.interrupt()
|
||||||
end
|
end
|
||||||
function NET.wsCallBack.room_getData(body)
|
function NET.wsCallBack.room_getData(body)
|
||||||
|
|||||||
Reference in New Issue
Block a user