mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 07:59:01 -06:00
Fixes an issue where IHS ignores buffer lock setting
This commit is contained in:
parent
e68a9b6f07
commit
f52a5eaee5
@ -151,7 +151,6 @@ function GameMode:update(inputs, ruleset)
|
|||||||
else
|
else
|
||||||
-- perform active frame actions such as fading out the next queue
|
-- perform active frame actions such as fading out the next queue
|
||||||
self:whilePieceActive()
|
self:whilePieceActive()
|
||||||
local gravity = self:getGravity()
|
|
||||||
|
|
||||||
if self.enable_hold and inputs["hold"] == true and self.held == false and self.prev_inputs["hold"] == false then
|
if self.enable_hold and inputs["hold"] == true and self.held == false and self.prev_inputs["hold"] == false then
|
||||||
self:hold(inputs, ruleset)
|
self:hold(inputs, ruleset)
|
||||||
@ -542,12 +541,12 @@ end
|
|||||||
function GameMode:initializeNextPiece(
|
function GameMode:initializeNextPiece(
|
||||||
inputs, ruleset, piece_data, generate_next_piece
|
inputs, ruleset, piece_data, generate_next_piece
|
||||||
)
|
)
|
||||||
if not inputs.hold and not self.buffer_soft_drop and self.lock_drop or (
|
if not self.buffer_soft_drop and self.lock_drop or (
|
||||||
not ruleset.are or self:getARE() == 0
|
not ruleset.are or self:getARE() == 0
|
||||||
) then
|
) then
|
||||||
self.drop_locked = true
|
self.drop_locked = true
|
||||||
end
|
end
|
||||||
if not inputs.hold and not self.buffer_hard_drop and self.lock_hard_drop or (
|
if not self.buffer_hard_drop and self.lock_hard_drop or (
|
||||||
not ruleset.are or self:getARE() == 0
|
not ruleset.are or self:getARE() == 0
|
||||||
) then
|
) then
|
||||||
self.hard_drop_locked = true
|
self.hard_drop_locked = true
|
||||||
@ -568,13 +567,12 @@ function GameMode:initializeNextPiece(
|
|||||||
self.piece.locked = self.lock_on_hard_drop
|
self.piece.locked = self.lock_on_hard_drop
|
||||||
self:onHardDrop(self.piece.position.y - prev_y)
|
self:onHardDrop(self.piece.position.y - prev_y)
|
||||||
end
|
end
|
||||||
if self.buffer_soft_drop then
|
if (
|
||||||
if (
|
self.buffer_soft_drop and
|
||||||
self.lock_on_soft_drop and
|
self.lock_on_soft_drop and
|
||||||
self.piece:isDropBlocked(self.grid)
|
self:getGravity() >= self.grid.height - 4
|
||||||
) then
|
) then
|
||||||
self.piece.locked = true
|
self.piece.locked = true
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.piece_hard_dropped = false
|
self.piece_hard_dropped = false
|
||||||
|
Loading…
Reference in New Issue
Block a user