| @@ -743,6 +743,7 @@ function love.update(dt) | |||||
| end | end | ||||
| serverinit = false | serverinit = false | ||||
| datawaspassedtimer = 0 | |||||
| clientinit = false | clientinit = false | ||||
| function love.textinput(t) | function love.textinput(t) | ||||
| if gameState == "chooseIP" then | if gameState == "chooseIP" then | ||||
| @@ -806,7 +807,13 @@ function nettest(dt) | |||||
| end | end | ||||
| until not data | until not data | ||||
| if not datawaspassed then | if not datawaspassed then | ||||
| datawaspassedtimer = datawaspassedtimer + 1 | |||||
| if datawaspassedtimer > 5 then | |||||
| confirmation = "D" | confirmation = "D" | ||||
| datawaspassedtimer = 0 | |||||
| end | |||||
| else | |||||
| datawaspassedtimer = 0 | |||||
| end | end | ||||
| end | end | ||||
| function clienttest(dt) | function clienttest(dt) | ||||
| @@ -854,8 +861,14 @@ function clienttest(dt) | |||||
| end | end | ||||
| print("GOT: " .. lastSentKeyClient) | print("GOT: " .. lastSentKeyClient) | ||||
| until not data | until not data | ||||
| if not datawaspassed then | |||||
| if not datawaspassed then | |||||
| datawaspassedtimer = datawaspassedtimer + 1 | |||||
| if datawaspassedtimer > 5 then | |||||
| confirmation = "D" | confirmation = "D" | ||||
| datawaspassedtimer = 0 | |||||
| end | |||||
| else | |||||
| datawaspassedtimer = 0 | |||||
| end | end | ||||
| end | end | ||||
| function wallbreaker(x, y) | function wallbreaker(x, y) | ||||