@@ -777,6 +777,7 @@ function nettest(dt) | |||||
'|' .. gameState .. | '|' .. gameState .. | ||||
'|' .. tostring(ball[i].dx) .. | '|' .. tostring(ball[i].dx) .. | ||||
'|' .. tostring(ballSpeed) .. | '|' .. tostring(ballSpeed) .. | ||||
'|' .. tostring(paddle_SPEED) .. | |||||
"|HOST") | "|HOST") | ||||
print("SENT: " .. lastSentKey) | print("SENT: " .. lastSentKey) | ||||
ts = 0 | ts = 0 | ||||
@@ -846,16 +847,16 @@ function clienttest(dt) | |||||
print("SENT TO SERVER:" .. lastSentKey) | print("SENT TO SERVER:" .. lastSentKey) | ||||
confirmation = "N" | confirmation = "N" | ||||
local p = split(data, '|') | local p = split(data, '|') | ||||
if p[14] then | if p[15] then | ||||
if p[14] ~= "HOST" then | if p[15] ~= "HOST" then | ||||
confirmation = "U" | confirmation = "U" | ||||
end | end | ||||
if tonumber(p[15]) > 90 then | if tonumber(p[16]) > 90 then | ||||
confirmation = "L" | confirmation = "L" | ||||
end | end | ||||
for i = 1, maxBalls do | for i = 1, maxBalls do | ||||
local die = tonumber(p[2]) | local die = tonumber(p[2]) | ||||
lastSentKeyClient, ball[i].dy, player1.y, player1score, player2score, player1nukescore, player2nukescore, ball[i].x, ball[i].y, gameState, ball[i].dx, ballSpeed = 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]) | 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]) | ||||
end | end | ||||
end | end | ||||
end | end | ||||
@@ -1057,18 +1057,12 @@ function clientsBaseGame(dt) | |||||
if (striken == 1) then | if (striken == 1) then | ||||
player1nukescore = player1nukescore * 1.2 | player1nukescore = player1nukescore * 1.2 | ||||
if (synctype == 0) then | |||||
paddle_SPEED = paddle_SPEED * 1.10 | |||||
elseif (synctype == 1) then | |||||
paddle_SPEED = ballSpeed / 10 | |||||
end | |||||
if (synctype == 0) then | if (synctype == 0) then | ||||
AI_SPEED = AI_SPEED * 1.10 | AI_SPEED = AI_SPEED * 1.10 | ||||
end | end | ||||
if (synctype == 1) then | if (synctype == 1) then | ||||
AI_SPEED = ballSpeed * 1.1 / 10 | AI_SPEED = ballSpeed * 1.1 / 10 | ||||
end | end | ||||
ballSpeed = ballSpeed * 1.10 | |||||
end | end | ||||
player1nukescore = player1nukescore + 10 | player1nukescore = player1nukescore + 10 | ||||
ball[i].dx = -ball[i].dx | ball[i].dx = -ball[i].dx | ||||