Browse Source

Online update

tags/online
madiwka3 4 years ago
parent
commit
15f5a48cda
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      main.lua

+ 13
- 1
main.lua View File

@@ -768,7 +768,19 @@ function nettest(dt)
end end
for i = 1, maxBalls do for i = 1, maxBalls do
print (tostring(ball[i].dy)) 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) print("SENT: " .. lastSentKey .. " TO ADDRESS: " .. IP)
end end
data = udp:receive() data = udp:receive()


Loading…
Cancel
Save