1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-01-06 21:40:17 +01:00

don't double-count tnt @ the center

This commit is contained in:
flux 2022-01-14 08:37:06 -08:00
parent 20793b8118
commit 4cd18a908b
No known key found for this signature in database
GPG Key ID: 9333B27816848A15

View File

@ -300,6 +300,13 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owne
c_tnt = c_tnt_burning -- tnt is not registered if disabled
end
-- don't double-count tnt @ the center
local v = a:index(pos.x, pos.y, pos.z)
local c = data[v]
if (c == c_tnt or c == c_tnt_boom or c == c_tnt_burning) then
data[v] = c_air
end
for z = pos.z - 2, pos.z + 2 do
for y = pos.y - 2, pos.y + 2 do
local vi = a:index(pos.x - 2, y, z)