From 9adaa3c3d6f3047232b0b3d4bca9096d92e18a89 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 2 May 2021 01:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=94=E7=BD=91=E5=AF=B9?= =?UTF-8?q?=E6=88=98=E6=97=B6=E2=80=9C=E9=80=80=E5=87=BA=E2=80=9D=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E7=9B=B8=E5=85=B3=E7=9A=84=E4=B8=80=E4=BA=9B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/net_game.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index 9baf1a5e..e0e60feb 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -112,7 +112,7 @@ end function scene.gamepadDown(key) if key=="back"then if TIME()-lastBackTime<1 then - SCN.back() + NET.signal_quit() else lastBackTime=TIME() LOG.print(text.sureQuit,COLOR.O) @@ -201,7 +201,10 @@ function scene.socketRead(cmd,d) end function scene.update(dt) - if NET.checkPlayDisconn()then SCN.back()end + if NET.checkPlayDisconn()then + NET.wsclose_stream() + SCN.back() + end if not playing then return end local P1=PLAYERS[1]