1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-09-28 15:08:48 +00:00

Update tron

This commit is contained in:
LDDestroier 2018-11-15 00:32:51 -05:00 committed by GitHub
parent 3f379bfcd1
commit 331743820f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
tron
View File

@ -675,8 +675,7 @@ local setDirection = function(keylist, p, checkDir)
p.direction = 2
elseif keylist[control.right] and (checkDir or p.direction) ~= 2 then
p.direction = 0
end
if keylist[control.up] and (checkDir or p.direction) ~= 1 then
elseif keylist[control.up] and (checkDir or p.direction) ~= 1 then
p.direction = -1
elseif keylist[control.down] and (checkDir or p.direction) ~= -1 then
p.direction = 1
@ -693,7 +692,6 @@ local game = function()
p = player[you]
np = player[nou]
if isHost then
setDirection(keysDown, p)
setDirection(netKeysDown, np)