mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-06 13:54:25 -04:00
Add sanity check.
This commit is contained in:
parent
ecb038d678
commit
ac8d54f24c
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ local function destroy(drops, npos, cid, bpos)
|
||||||
end
|
end
|
||||||
local def = cid_data[cid]
|
local def = cid_data[cid]
|
||||||
if def and def.on_blast then
|
if def and def.on_blast then
|
||||||
local dist = vector.distance(bpos, npos)
|
local dist = vector.distance(bpos, npos) or 0.5
|
||||||
local intensity = 1 / (dist * dist)
|
local intensity = 1 / (dist * dist)
|
||||||
def.on_blast(vector.new(npos), intensity)
|
def.on_blast(vector.new(npos), intensity)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue