mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-11-22 13:09:02 -06:00
Realized I can just use the rot_dir variable
This commit is contained in:
parent
dbe31f398f
commit
74fd702711
@ -88,12 +88,11 @@ TheNext.wallkicks_ccw = {{x=-1, y=0}, {x=0, y=1}, {x=1, y=0}, {x=0, y=-1}}
|
|||||||
TheNext.wallkicks_cw = {{x=1, y=0}, {x=0, y=1}, {x=-1, y=0}, {x=0, y=-1}}
|
TheNext.wallkicks_cw = {{x=1, y=0}, {x=0, y=1}, {x=-1, y=0}, {x=0, y=-1}}
|
||||||
|
|
||||||
function TheNext:attemptWallkicks(piece, new_piece, rot_dir, grid)
|
function TheNext:attemptWallkicks(piece, new_piece, rot_dir, grid)
|
||||||
|
|
||||||
local kicks
|
local kicks
|
||||||
if piece.shape == "O" then
|
if piece.shape == "O" then
|
||||||
return
|
return
|
||||||
elseif new_piece.rotation == piece.rotation + 1 or
|
elseif rot_dir == 1 then
|
||||||
(piece.rotation == 3 and new_piece.rotation == 0) then
|
|
||||||
kicks = TheNext.wallkicks_cw
|
kicks = TheNext.wallkicks_cw
|
||||||
else
|
else
|
||||||
kicks = TheNext.wallkicks_ccw
|
kicks = TheNext.wallkicks_ccw
|
||||||
@ -127,4 +126,4 @@ end
|
|||||||
|
|
||||||
function TheNext:getDefaultOrientation() return 3 end
|
function TheNext:getDefaultOrientation() return 3 end
|
||||||
|
|
||||||
return TheNext
|
return TheNext
|
Loading…
Reference in New Issue
Block a user