From ac8d54f24cfbc035284795eb0a495677f87751d2 Mon Sep 17 00:00:00 2001 From: red-001 Date: Wed, 27 Jan 2016 23:46:50 +0000 Subject: [PATCH] Add sanity check. --- mods/tnt/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index ddc65d7f..fe75de52 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -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