Fixed EARS locking in midair from beta4

This commit is contained in:
Ishaan Bhardwaj 2021-02-17 21:46:01 -05:00
parent ad047fa68e
commit 209ff25342

View File

@ -24,9 +24,9 @@ function EARS:attemptWallkicks(piece, new_piece, rot_dir, grid)
offset = {x=tx, y=y} offset = {x=tx, y=y}
kicked_piece = new_piece:withOffset(offset) kicked_piece = new_piece:withOffset(offset)
if grid:canPlacePiece(kicked_piece) then if grid:canPlacePiece(kicked_piece) then
self:onPieceRotate(piece, grid)
piece:setRelativeRotation(rot_dir) piece:setRelativeRotation(rot_dir)
piece:setOffset(offset) piece:setOffset(offset)
self:onPieceRotate(piece, grid, offset.y < 0)
return return
end end
end end