修游戏中有人退出房间有一处复制漏改

观战时会默认视角为sid最小的人
This commit is contained in:
MrZ_26
2022-10-24 15:05:01 +08:00
parent d4d97f1e7f
commit a4db061485
2 changed files with 3 additions and 1 deletions

View File

@@ -433,7 +433,7 @@ end
--Remove player when leave
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(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 and SCN.cur=='net_game' then
SCN.back()
else

View File

@@ -253,6 +253,8 @@ function scene.update(dt)
for i=1,#NETPLY.list do
NETPLY.list[i].readyMode='Playing'
end
noKey=PLAYERS[1].uid~=USER.uid
noTouch=noKey
end
end
end