Smooth piece drop

This commit is contained in:
Ishaan Bhardwaj 2020-12-17 18:00:07 -05:00
parent ce27a7ed18
commit 1101aa467d
2 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@ ConfigScene.options = {
{"display_gamemode", "Display Gamemode", {"On", "Off"}}, {"display_gamemode", "Display Gamemode", {"On", "Off"}},
{"next_se", "Next Piece SFX", {"On", "Off"}}, {"next_se", "Next Piece SFX", {"On", "Off"}},
{"das_last_key", "DAS Switch", {"Default", "Instant"}}, {"das_last_key", "DAS Switch", {"Default", "Instant"}},
{"smooth_movement", "Smooth Piece Drop", {"On", "Off"}},
{"synchroes_allowed", "Synchroes", {"Per ruleset", "On", "Off"}}, {"synchroes_allowed", "Synchroes", {"Per ruleset", "On", "Off"}},
{"diagonal_input", "Diagonal Input", {"On", "Off"}} {"diagonal_input", "Diagonal Input", {"On", "Off"}}
} }

View File

@ -143,9 +143,10 @@ function Piece:draw(opacity, brightness, grid, partial_das)
love.graphics.setColor(brightness, brightness, brightness, opacity) love.graphics.setColor(brightness, brightness, brightness, opacity)
local offsets = self:getBlockOffsets() local offsets = self:getBlockOffsets()
local gravity_offset = 0 local gravity_offset = 0
--if grid ~= nil and not self:isDropBlocked(grid) then if config.gamesettings.smooth_movement == 1 and
-- gravity_offset = self.gravity * 16 grid ~= nil and not self:isDropBlocked(grid) then
--end gravity_offset = self.gravity * 16
end
if partial_das == nil then partial_das = 0 end if partial_das == nil then partial_das = 0 end
for index, offset in pairs(offsets) do for index, offset in pairs(offsets) do
local x = self.position.x + offset.x local x = self.position.x + offset.x