소스 검색

New

tags/chalkboard
madiwka3 4 년 전
부모
커밋
1930fcc29a
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. +5
    -5
      main.lua

+ 5
- 5
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)


불러오는 중...
취소
저장