mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-27 22:03:04 +00:00
Fix crash when blowing up TNT
This commit is contained in:
parent
f27902df03
commit
096744dc6c
1 changed files with 4 additions and 3 deletions
|
@ -158,14 +158,15 @@ function TNT:on_step(dtime)
|
|||
self.blinkstatus = not self.blinkstatus
|
||||
end
|
||||
if self.timer > 4 then
|
||||
tnt.boom(self.object:getpos(), TNT_RANGE)
|
||||
tnt.boom(self.object:getpos())
|
||||
self.object:remove()
|
||||
end
|
||||
end
|
||||
|
||||
tnt.boom = function(pos, info)
|
||||
local range = info.radius
|
||||
local damage_range = info.damage_radius
|
||||
if not info then info = {} end
|
||||
local range = info.radius or TNT_RANGE
|
||||
local damage_range = info.damage_radius or TNT_RANGE
|
||||
|
||||
pos.x = math.floor(pos.x+0.5)
|
||||
pos.y = math.floor(pos.y+0.5)
|
||||
|
|
Loading…
Reference in a new issue