|
|
@@ -826,8 +826,32 @@ function nettest(dt) |
|
|
|
ball[1].dx, |
|
|
|
ballSpeed, |
|
|
|
paddle_SPEED = p[1], die, tonumber(p[4]), tonumber(p[5]), tonumber(p[6]), tonumber(p[7]), tonumber(p[8]), tonumber(p[9]), tonumber(p[10]), p[11], tonumber(p[12]), tonumber(p[13]), tonumber(p[14]) |
|
|
|
end |
|
|
|
print("ACCEPTED") |
|
|
|
else |
|
|
|
print("DECLINED") |
|
|
|
lastSentKeyClient = p[1] |
|
|
|
player2.y = tonumber(p[4]) |
|
|
|
ball[1].x = tonumber(p[9]) |
|
|
|
end |
|
|
|
else |
|
|
|
if tonumber(p[9]) > VIRTUAL_WIDTH/2 then |
|
|
|
die = tonumber(p[2]) |
|
|
|
lastSentKeyClient, |
|
|
|
ball[1].dy, |
|
|
|
player2.y, |
|
|
|
player1score, |
|
|
|
player2score, |
|
|
|
player1nukescore, |
|
|
|
player2nukescore, |
|
|
|
ball[1].x, |
|
|
|
ball[1].y, |
|
|
|
gameState, |
|
|
|
ball[1].dx, |
|
|
|
ballSpeed, |
|
|
|
paddle_SPEED = p[1], die, tonumber(p[4]), tonumber(p[5]), tonumber(p[6]), tonumber(p[7]), tonumber(p[8]), tonumber(p[9]), tonumber(p[10]), p[11], tonumber(p[12]), tonumber(p[13]), tonumber(p[14]) |
|
|
|
print("ACCEPTED") |
|
|
|
end |
|
|
|
print("ENFORCED") |
|
|
|
lastSentKeyClient = p[1] |
|
|
|
player2.y = tonumber(p[4]) |
|
|
|
end |
|
|
@@ -900,10 +924,17 @@ function clienttest(dt) |
|
|
|
if (ball[i].x <= VIRTUAL_WIDTH/2) then |
|
|
|
if tonumber(p[9]) <= VIRTUAL_WIDTH/2 then |
|
|
|
lastSentKeyClient, ball[i].dy, player1.y, player1score, player2score, player1nukescore, player2nukescore, ball[i].x, ball[i].y, gameState, ball[i].dx, ballSpeed, paddle_SPEED = p[1], die, tonumber(p[4]), tonumber(p[5]), tonumber(p[6]), tonumber(p[7]), tonumber(p[8]), tonumber(p[9]), tonumber(p[10]), p[11], tonumber(p[12]), tonumber(p[13]), tonumber(p[14]) |
|
|
|
print("ACCEPTED") |
|
|
|
else |
|
|
|
print("DECLINED") |
|
|
|
end |
|
|
|
else |
|
|
|
lastSentKeyClient = p[1] |
|
|
|
if tonumber(p[9]) <= VIRTUAL_WIDTH/2 then |
|
|
|
lastSentKeyClient, ball[i].dy, player1.y, player1score, player2score, player1nukescore, player2nukescore, ball[i].x, ball[i].y, gameState, ball[i].dx, ballSpeed, paddle_SPEED = p[1], die, tonumber(p[4]), tonumber(p[5]), tonumber(p[6]), tonumber(p[7]), tonumber(p[8]), tonumber(p[9]), tonumber(p[10]), p[11], tonumber(p[12]), tonumber(p[13]), tonumber(p[14]) |
|
|
|
print("REROUTED") |
|
|
|
else lastSentKeyClient = p[1] |
|
|
|
player1.y = tonumber(p[4]) |
|
|
|
print("ENFORCED") |
|
|
|
end |
|
|
|
end |
|
|
|
else |
|
|
|