Fixed negative soft drop and hard drop points again

For finer control of piece drops, use GameMode:onPieceDrop
pull/17/head
Ishaan Bhardwaj 2021-03-09 16:35:57 -05:00
parent 4ab5e3747a
commit b1d325b714
1 changed files with 2 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(piece_dy)
self:onHardDrop(math.max(piece_dy, 0))
if self.lock_on_hard_drop then
self.piece_hard_dropped = true
self.piece.locked = true
@ -226,7 +226,7 @@ function GameMode:update(inputs, ruleset)
end
if inputs["down"] == true then
self:onSoftDrop(piece_dy)
self:onSoftDrop(math.max(piece_dy, 0))
if self.piece:isDropBlocked(self.grid) and
not self.drop_locked and
self.lock_on_soft_drop