mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 13:39:02 -06:00
Fixed a corner case in the last commit
This commit is contained in:
parent
1f0b43f1b7
commit
2ea75cdfaf
@ -534,11 +534,18 @@ function GameMode:initializeNextPiece(inputs, ruleset, piece_data, generate_next
|
|||||||
end
|
end
|
||||||
if self.buffer_hard_drop then
|
if self.buffer_hard_drop then
|
||||||
self.buffer_hard_drop = false
|
self.buffer_hard_drop = false
|
||||||
|
local above_field = (
|
||||||
|
(config.gamesettings.spawn_positions == 1 and
|
||||||
|
ruleset.spawn_above_field) or
|
||||||
|
config.gamesettings.spawn_positions == 3
|
||||||
|
)
|
||||||
self:onHardDrop(self.piece.position.y - (
|
self:onHardDrop(self.piece.position.y - (
|
||||||
self.piece.big and
|
self.piece.big and
|
||||||
ruleset.big_spawn_positions[self.piece.shape].y or
|
ruleset.big_spawn_positions[self.piece.shape].y or
|
||||||
ruleset.spawn_positions[self.piece.shape].y) +
|
ruleset.spawn_positions[self.piece.shape].y) +
|
||||||
ruleset:getAboveFieldOffset(piece_data.shape, piece_data.orientation)
|
(above_field and ruleset:getAboveFieldOffset(
|
||||||
|
piece_data.shape, piece_data.orientation
|
||||||
|
) or 0)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
if self.buffer_soft_drop then
|
if self.buffer_soft_drop then
|
||||||
|
Loading…
Reference in New Issue
Block a user