mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 00:21:07 +01: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