mirror of
https://github.com/SashLilac/cambridge-modpack.git
synced 2024-12-25 00:09:02 -06:00
Shirase O kicks fixed
This commit is contained in:
parent
520f553e6a
commit
e67f431478
@ -60,6 +60,29 @@ Shirase.block_offsets = {
|
||||
}
|
||||
}
|
||||
|
||||
function Shirase:attemptWallkicks(piece, new_piece, rot_dir, grid)
|
||||
|
||||
local kicks
|
||||
if piece.shape == "I" then
|
||||
kicks = SRS.wallkicks_line[piece.rotation][new_piece.rotation]
|
||||
else
|
||||
kicks = SRS.wallkicks_3x3[piece.rotation][new_piece.rotation]
|
||||
end
|
||||
|
||||
assert(piece.rotation ~= new_piece.rotation)
|
||||
|
||||
for idx, offset in pairs(kicks) do
|
||||
kicked_piece = new_piece:withOffset(offset)
|
||||
if grid:canPlacePiece(kicked_piece) then
|
||||
piece:setRelativeRotation(rot_dir)
|
||||
piece:setOffset(offset)
|
||||
self:onPieceRotate(piece, grid)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function Shirase:onPieceDrop(piece) piece.lock_delay = 0 end
|
||||
function Shirase:onPieceMove(piece) piece.lock_delay = 0 end
|
||||
function Shirase:onPieceRotate(piece) piece.lock_delay = 0 end
|
||||
|
Loading…
Reference in New Issue
Block a user