fix crash on balrog dead if not enabled tnt explosion
* closes https://codeberg.org/minenux/minetest-mod-mobs_balrog/issues/4
* backported upstream commit bf4b9521cd
This commit is contained in:
parent
e19cb34416
commit
ce2add8d5b
@ -4,6 +4,7 @@
|
||||
|
||||
[subnasa-player-server]
|
||||
enable_pvp = true
|
||||
enable_tnt = true
|
||||
creative_mode = false
|
||||
enable_damage = true
|
||||
default_privs = interact, shout
|
||||
|
@ -117,6 +117,7 @@ if (PATH_FINDER == nil) then
|
||||
PATH_FINDER = 1
|
||||
end
|
||||
|
||||
local enable_tnt = minetest.settings:get_bool("enable_tnt")
|
||||
|
||||
local spawn_nodes = {"group:stone"}
|
||||
if minetest.get_modpath("nether") then
|
||||
@ -206,15 +207,18 @@ mobs:register_mob("mobs_jam:balrog", {
|
||||
texture = "fire_basic_flame.png",
|
||||
collisiondetection = true,
|
||||
})
|
||||
tnt.boom(pos, {
|
||||
name = "Balrog's Blast",
|
||||
radius = 14,
|
||||
damage_radius = 50,
|
||||
disable_drops = true,
|
||||
ignore_protection = false,
|
||||
ignore_on_blast = false,
|
||||
tiles = {""},
|
||||
})
|
||||
-- Default to enabled when in singleplayer
|
||||
if enable_tnt then
|
||||
tnt.boom(pos, {
|
||||
name = "Balrog's Blast",
|
||||
radius = 14,
|
||||
damage_radius = 50,
|
||||
disable_drops = true,
|
||||
ignore_protection = false,
|
||||
ignore_on_blast = false,
|
||||
tiles = {""},
|
||||
})
|
||||
end
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user