Fix an edge case in snappy controls

This commit is contained in:
Pyrex 2022-12-30 22:41:08 -08:00
parent 87219678ef
commit 37283c146d

View File

@ -661,13 +661,13 @@ function player:update()
wrongbleep:bleep() wrongbleep:bleep()
end end
if btncd(0) then if btncd(0) then
try_move(-1,0,{{orientx=-1,orienty=0,px=-2},{px=1}}) try_move(-1,0,{{orientx=-1,orienty=0,px=-2,py=0},{px=1}})
elseif btncd(1) then elseif btncd(1) then
try_move(1,0,{{orientx=1,orienty=0,px=2},{px=-1}}) try_move(1,0,{{orientx=1,orienty=0,px=2,py=0},{px=-1}})
elseif btncd(2) then elseif btncd(2) then
try_move(0,-1,{{orienty=-1,py=-2},{py=1}}) try_move(0,-1,{{orienty=-1,px=0,py=-2},{py=1}})
elseif btncd(3) then elseif btncd(3) then
try_move(0,1,{{orienty=1,py=2},{py=-1}}) try_move(0,1,{{orienty=1,px=0,py=2},{py=-1}})
elseif not self.rope and kbd:btnr(4) then elseif not self.rope and kbd:btnr(4) then
local dx,dy=self.orientx,self.orienty local dx,dy=self.orientx,self.orienty
if (dy!=0) dx=0 if (dy!=0) dx=0