mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-30 14:53:00 +00:00
Merge pull request 'Fix crash when blowing up an unknown node' (#38) from mcl_explosions into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/38 Reviewed-by: n_to <n_to@noreply.git.minetest.land> Reviewed-by: erlehmann <nils+git.minetest.land@dieweltistgarnichtso.net>
This commit is contained in:
commit
d6463fe29a
1 changed files with 4 additions and 1 deletions
|
@ -202,7 +202,10 @@ local function trace_explode(pos, strength, raydirs, radius, info, puncher)
|
|||
npos_x - emin_x + 1
|
||||
|
||||
local cid = data[idx]
|
||||
local br = node_blastres[cid]
|
||||
|
||||
-- Set blast resistance to 0 for unknown nodes
|
||||
local br = node_blastres[cid] or 0
|
||||
|
||||
if br < INDESTRUCT_BLASTRES and br > max_blast_resistance then
|
||||
br = max_blast_resistance
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue