diff --git a/main.lua b/main.lua index 9b379ec..cc33916 100644 --- a/main.lua +++ b/main.lua @@ -695,7 +695,7 @@ function speedControl() end function love.update(dt) - print(globalState .. gameState) + print("IMPORTANT!!!!!" .. globalState .. gameState) staticanimatorcounter(dt) musicController('norm', 1) if debug then @@ -763,7 +763,7 @@ function clienttest(dt) local die = tonumber(p[2]) print(p[2]) 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 print(confirmation .. " recieved " .. lastSentKeyClient) diff --git a/src/baseGame.lua b/src/baseGame.lua index a652549..58e37ed 100644 --- a/src/baseGame.lua +++ b/src/baseGame.lua @@ -985,11 +985,13 @@ function clientsBaseGame(dt) if ((confirmation == "up1" and love.keyboard.isDown(p1control.up)) or lastSentKeyP1 == p1control.up) then player1.dy = (paddle_SPEED + p2bonus) * -1 - + print("moving player1 up") elseif ((confirmation == "up1" and love.keyboard.isDown(p1control.down)) or lastSentKeyP1 == p1control.down) then player1.dy = paddle_SPEED + p2bonus + print("moving player1 down") else player1.dy = 0 + print("stopping player") end if ((confirmation == "up2" and love.keyboard.isDown(p2control.up)) or lastSentKeyP2 == p2control.up) then player2.dy = (paddle_SPEED + p2bonus) * -1