mirror of
https://github.com/LDDestroier/CC/
synced 2025-07-16 08:53:08 +00:00
Fixed P2 connecting to nobody with skynet
This commit is contained in:
parent
3a5f1128f1
commit
9eecb9f9b6
6
tron.lua
6
tron.lua
@ -923,8 +923,6 @@ local game = function()
|
||||
end
|
||||
end
|
||||
|
||||
local decision
|
||||
|
||||
local networking = function()
|
||||
local evt, side, channel, repchannel, msg, distance
|
||||
while true do
|
||||
@ -998,6 +996,8 @@ local helpScreen = function()
|
||||
waitForKey(0.25)
|
||||
end
|
||||
|
||||
local decision
|
||||
|
||||
local main = function()
|
||||
local rVal
|
||||
while true do
|
||||
@ -1027,6 +1027,7 @@ local main = function()
|
||||
grid = initGrid
|
||||
})
|
||||
rVal = parallel.waitForAny( pleaseWait, networking )
|
||||
-- give time for skynet
|
||||
sleep(0.1)
|
||||
if rVal == 2 then
|
||||
startCountdown()
|
||||
@ -1044,6 +1045,7 @@ end
|
||||
|
||||
if useSkynet then
|
||||
parallel.waitForAny(main, skynet.listen)
|
||||
skynet.socket.close()
|
||||
else
|
||||
main()
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user