mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 18:39:02 -06:00
Another bottom SFX bug fix
This commit is contained in:
parent
fa97216167
commit
4e9cea7dda
@ -160,6 +160,7 @@ end
|
|||||||
|
|
||||||
function Ruleset:movePiece(piece, grid, move, instant)
|
function Ruleset:movePiece(piece, grid, move, instant)
|
||||||
local x = piece.position.x
|
local x = piece.position.x
|
||||||
|
local was_drop_blocked = piece:isDropBlocked(grid)
|
||||||
if move == "left" then
|
if move == "left" then
|
||||||
piece:moveInGrid({x=-1, y=0}, 1, grid, false)
|
piece:moveInGrid({x=-1, y=0}, 1, grid, false)
|
||||||
elseif move == "right" then
|
elseif move == "right" then
|
||||||
@ -171,6 +172,9 @@ function Ruleset:movePiece(piece, grid, move, instant)
|
|||||||
end
|
end
|
||||||
if piece.position.x ~= x then
|
if piece.position.x ~= x then
|
||||||
self:onPieceMove(piece, grid)
|
self:onPieceMove(piece, grid)
|
||||||
|
if not was_drop_blocked and piece:isDropBlocked(grid) then
|
||||||
|
playSE("bottom")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user