From 1930fcc29aa6c370e00724b1623cf0f52f51da7a Mon Sep 17 00:00:00 2001 From: madiwka3 Date: Sat, 8 Aug 2020 13:12:33 +0600 Subject: [PATCH] New --- main.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.lua b/main.lua index 28f94e8..965e2b1 100644 --- a/main.lua +++ b/main.lua @@ -730,15 +730,15 @@ function nettest(dt) udp:settimeout(0) serverinit = true 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) .. "|confirmed|" .. tostring(ball[i].x) .. '|' .. tostring(ball[i].y)) + print("SENT: " .. lastSentKey) + end data = udp:receive() if data then local p = split(data, '|') lastSentKeyClient = p[1] - 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) .. "|confirmed|" .. tostring(ball[i].x) .. '|' .. tostring(ball[i].y)) - print("SENT: " .. lastSentKey) - end end end function clienttest(dt)