mirror of
https://github.com/LDDestroier/CC/
synced 2024-11-17 15:24:52 +00:00
Fixed crash
This commit is contained in:
parent
096fb60f77
commit
2b611cda3d
@ -737,7 +737,7 @@ local calculateGarbage = function(lines, combo, backToBack, didTspin)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- actually give a player some garbage
|
-- actually give a player some garbage
|
||||||
local doleOutGarbage = function(player, amount)
|
local doleOutGarbage = function(player, cPlayer, amount)
|
||||||
local board = player.board
|
local board = player.board
|
||||||
local gx = math.random(1, board.xSize)
|
local gx = math.random(1, board.xSize)
|
||||||
local repeatProbability = 75 -- percent probability that garbage will leave the same hole open
|
local repeatProbability = 75 -- percent probability that garbage will leave the same hole open
|
||||||
@ -1118,7 +1118,7 @@ local startGame = function(playerNumber)
|
|||||||
-- take some garbage for yourself
|
-- take some garbage for yourself
|
||||||
|
|
||||||
if cPlayer.garbage > 0 then
|
if cPlayer.garbage > 0 then
|
||||||
doleOutGarbage(player, cPlayer.garbage)
|
doleOutGarbage(player, cPlayer, cPlayer.garbage)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user