@@ -695,7 +695,7 @@ function speedControl() | |||||
end | end | ||||
function love.update(dt) | function love.update(dt) | ||||
print(globalState .. gameState) | |||||
print("IMPORTANT!!!!!" .. globalState .. gameState) | |||||
staticanimatorcounter(dt) | staticanimatorcounter(dt) | ||||
musicController('norm', 1) | musicController('norm', 1) | ||||
if debug then | if debug then | ||||
@@ -763,7 +763,7 @@ function clienttest(dt) | |||||
local die = tonumber(p[2]) | local die = tonumber(p[2]) | ||||
print(p[2]) | print(p[2]) | ||||
print(p[2] + 0) | print(p[2] + 0) | ||||
lastSentKeyClient, ball[i].dy, player2.y, player1.y, player1score, player2score, player1nukescore, player2nukescore, confirmation = p[1], die, tonumber(p[3]), tonumber(p[4]), tonumber(p[5]), tonumber(p[6]), tonumber(p[7]), tonumber(p[8]), p[9] | |||||
lastSentKeyClient, ball[i].dy, player2.y, player1.y, player1score, player2score, player1nukescore, player2nukescore, confirmation, gameState = p[1], die, tonumber(p[3]), tonumber(p[4]), tonumber(p[5]), tonumber(p[6]), tonumber(p[7]), tonumber(p[8]), p[9], p[10] | |||||
end | end | ||||
end | end | ||||
print(confirmation .. " recieved " .. lastSentKeyClient) | print(confirmation .. " recieved " .. lastSentKeyClient) | ||||
@@ -985,11 +985,13 @@ function clientsBaseGame(dt) | |||||
if ((confirmation == "up1" and love.keyboard.isDown(p1control.up)) or lastSentKeyP1 == p1control.up) then | if ((confirmation == "up1" and love.keyboard.isDown(p1control.up)) or lastSentKeyP1 == p1control.up) then | ||||
player1.dy = (paddle_SPEED + p2bonus) * -1 | player1.dy = (paddle_SPEED + p2bonus) * -1 | ||||
print("moving player1 up") | |||||
elseif ((confirmation == "up1" and love.keyboard.isDown(p1control.down)) or lastSentKeyP1 == p1control.down) then | elseif ((confirmation == "up1" and love.keyboard.isDown(p1control.down)) or lastSentKeyP1 == p1control.down) then | ||||
player1.dy = paddle_SPEED + p2bonus | player1.dy = paddle_SPEED + p2bonus | ||||
print("moving player1 down") | |||||
else | else | ||||
player1.dy = 0 | player1.dy = 0 | ||||
print("stopping player") | |||||
end | end | ||||
if ((confirmation == "up2" and love.keyboard.isDown(p2control.up)) or lastSentKeyP2 == p2control.up) then | if ((confirmation == "up2" and love.keyboard.isDown(p2control.up)) or lastSentKeyP2 == p2control.up) then | ||||
player2.dy = (paddle_SPEED + p2bonus) * -1 | player2.dy = (paddle_SPEED + p2bonus) * -1 | ||||