1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-11-08 19:09:58 +00:00

Fixed crash

This commit is contained in:
LDDestroier 2019-11-21 03:39:35 -05:00 committed by GitHub
parent 096fb60f77
commit 2b611cda3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -737,7 +737,7 @@ local calculateGarbage = function(lines, combo, backToBack, didTspin)
end
-- actually give a player some garbage
local doleOutGarbage = function(player, amount)
local doleOutGarbage = function(player, cPlayer, amount)
local board = player.board
local gx = math.random(1, board.xSize)
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
if cPlayer.garbage > 0 then
doleOutGarbage(player, cPlayer.garbage)
doleOutGarbage(player, cPlayer, cPlayer.garbage)
end
end
else