From 4e9cea7dda94dba73fce4cc3de5aaf157fb16f24 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Tue, 12 Jan 2021 15:57:45 -0500 Subject: [PATCH] Another bottom SFX bug fix --- tetris/rulesets/ruleset.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tetris/rulesets/ruleset.lua b/tetris/rulesets/ruleset.lua index 6509e69..50a8121 100644 --- a/tetris/rulesets/ruleset.lua +++ b/tetris/rulesets/ruleset.lua @@ -160,6 +160,7 @@ end function Ruleset:movePiece(piece, grid, move, instant) local x = piece.position.x + local was_drop_blocked = piece:isDropBlocked(grid) if move == "left" then piece:moveInGrid({x=-1, y=0}, 1, grid, false) elseif move == "right" then @@ -171,6 +172,9 @@ function Ruleset:movePiece(piece, grid, move, instant) end if piece.position.x ~= x then self:onPieceMove(piece, grid) + if not was_drop_blocked and piece:isDropBlocked(grid) then + playSE("bottom") + end end end