mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 03:29:02 -06:00
Fixed up an edge case in immobile spin
This commit is contained in:
parent
9f8e9a9778
commit
86e975f929
@ -206,14 +206,14 @@ function GameMode:update(inputs, ruleset)
|
||||
self.piece.last_rotated = false
|
||||
self:onPieceMove(self.piece, self.grid, piece_dx)
|
||||
end
|
||||
if (piece_drot ~= 0) then
|
||||
self.piece.last_rotated = true
|
||||
self:onPieceRotate(self.piece, self.grid, piece_drot)
|
||||
end
|
||||
if (piece_dy ~= 0) then
|
||||
self.piece.last_rotated = false
|
||||
self:onPieceDrop(self.piece, self.grid, piece_dy)
|
||||
end
|
||||
if (piece_drot ~= 0) then
|
||||
self.piece.last_rotated = true
|
||||
self:onPieceRotate(self.piece, self.grid, piece_drot)
|
||||
end
|
||||
|
||||
if inputs["up"] == true and
|
||||
self.piece:isDropBlocked(self.grid) and
|
||||
@ -242,7 +242,8 @@ function GameMode:update(inputs, ruleset)
|
||||
|
||||
if self.piece.locked == true then
|
||||
-- spin detection, immobile only for now
|
||||
if self.immobile_spin_bonus and (
|
||||
if self.immobile_spin_bonus and
|
||||
self.piece.last_rotated and (
|
||||
self.piece:isDropBlocked(self.grid) and
|
||||
self.piece:isMoveBlocked(self.grid, { x=-1, y=0 }) and
|
||||
self.piece:isMoveBlocked(self.grid, { x=1, y=0 }) and
|
||||
|
Loading…
Reference in New Issue
Block a user