Skip to content
Snippets Groups Projects
Commit 6c83ea0b authored by tenplus1's avatar tenplus1 Committed by paramat
Browse files

TNT: Fix bug with huge stacks

This fixes the TNT bug that can crash game when blowing up a container
which holds huge stacks above the norm... e.g. give yourself 65535 snow,
place in chest, blow up, stalled!
parent 265c40b5
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ end
local function eject_drops(drops, pos, radius)
local drop_pos = vector.new(pos)
for _, item in pairs(drops) do
local count = item:get_count()
local count = math.min(item:get_count(), 99)
while count > 0 do
local take = math.max(1,math.min(radius * radius,
count,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment