mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-04 21:10:04 -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
|
||||
local def = cid_data[cid]
|
||||
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)
|
||||
def.on_blast(vector.new(npos), intensity)
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue