diff --git a/scene/game_config.lua b/scene/game_config.lua index faaaf7e..a67bcd4 100644 --- a/scene/game_config.lua +++ b/scene/game_config.lua @@ -12,6 +12,7 @@ ConfigScene.options = { {"display_gamemode", "Display Gamemode", {"On", "Off"}}, {"next_se", "Next Piece SFX", {"On", "Off"}}, {"das_last_key", "DAS Switch", {"Default", "Instant"}}, + {"smooth_movement", "Smooth Piece Drop", {"On", "Off"}}, {"synchroes_allowed", "Synchroes", {"Per ruleset", "On", "Off"}}, {"diagonal_input", "Diagonal Input", {"On", "Off"}} } diff --git a/tetris/components/piece.lua b/tetris/components/piece.lua index 1d82c23..3b6b34a 100644 --- a/tetris/components/piece.lua +++ b/tetris/components/piece.lua @@ -143,9 +143,10 @@ function Piece:draw(opacity, brightness, grid, partial_das) love.graphics.setColor(brightness, brightness, brightness, opacity) local offsets = self:getBlockOffsets() local gravity_offset = 0 - --if grid ~= nil and not self:isDropBlocked(grid) then - -- gravity_offset = self.gravity * 16 - --end + if config.gamesettings.smooth_movement == 1 and + grid ~= nil and not self:isDropBlocked(grid) then + gravity_offset = self.gravity * 16 + end if partial_das == nil then partial_das = 0 end for index, offset in pairs(offsets) do local x = self.position.x + offset.x