Made a previous fix to soft drop points obsolete w/ new fix

pull/17/head
Ishaan Bhardwaj 2021-03-10 13:30:29 -05:00
parent b1d325b714
commit 2189e3a7b8
1 changed files with 7 additions and 2 deletions

View File

@ -218,7 +218,7 @@ function GameMode:update(inputs, ruleset)
if inputs["up"] == true and
self.piece:isDropBlocked(self.grid) and
not self.hard_drop_locked then
self:onHardDrop(math.max(piece_dy, 0))
self:onHardDrop(piece_dy)
if self.lock_on_hard_drop then
self.piece_hard_dropped = true
self.piece.locked = true
@ -226,7 +226,12 @@ function GameMode:update(inputs, ruleset)
end
if inputs["down"] == true then
self:onSoftDrop(math.max(piece_dy, 0))
if not (
self.piece:isDropBlocked(self.grid) and
piece_drot ~= 0
) then
self:onSoftDrop(piece_dy)
end
if self.piece:isDropBlocked(self.grid) and
not self.drop_locked and
self.lock_on_soft_drop