Made instant DAS respect instant gravity.

This commit is contained in:
Joe Z
2019-07-07 17:25:35 -04:00
parent c40392f00f
commit 7227085f84
2 changed files with 11 additions and 8 deletions

View File

@@ -77,12 +77,15 @@ function Piece:setRelativeRotation(rot)
return self
end
function Piece:moveInGrid(step, squares, grid)
function Piece:moveInGrid(step, squares, grid, instant)
local moved = false
for x = 1, squares do
if grid:canPlacePiece(self:withOffset(step)) then
moved = true
self:setOffset(step)
if instant then
self:dropToBottom(grid)
end
else
break
end