浏览代码

Online update

tags/online
madiwka3 4 年前
父节点
当前提交
15f5a48cda
共有 1 个文件被更改,包括 13 次插入1 次删除
  1. +13
    -1
      main.lua

+ 13
- 1
main.lua 查看文件

@@ -768,7 +768,19 @@ function nettest(dt)
end
for i = 1, maxBalls do
print (tostring(ball[i].dy))
udp:send(tostring(lastSentKey) ..'|'.. tostring(ball[i].dy) .. '|' .. tostring(player2.y) .. '|' .. tostring(player1.y) .. '|' .. tostring(player1score) .. '|' .. tostring(player2score) .. '|' .. tostring(player1nukescore) .. '|' .. tostring(player2nukescore) .. '|' tostring(ball[i].x) .. '|' .. tostring(ball[i].y) .. '|' .. gameState .. '|' .. tostring(ball[i].dx) .. "|HOST")
udp:send(tostring(lastSentKey) ..
'|' .. tostring(ball[i].dy) ..
'|' .. tostring(player2.y) ..
'|' .. tostring(player1.y) ..
'|' .. tostring(player1score) ..
'|' .. tostring(player2score) ..
'|' .. tostring(player1nukescore) ..
'|' .. tostring(player2nukescore) ..
'|' .. tostring(ball[i].x) ..
'|' .. tostring(ball[i].y) ..
'|' .. gameState ..
'|' .. tostring(ball[i].dx) ..
"|HOST")
print("SENT: " .. lastSentKey .. " TO ADDRESS: " .. IP)
end
data = udp:receive()


正在加载...
取消
保存