mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 18:49:03 -06:00
Smooth piece drop
This commit is contained in:
parent
ce27a7ed18
commit
1101aa467d
@ -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"}}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user