1
0
Fork 0

Make TNT entity immortal

objects
Wuzzy 2017-02-27 23:45:26 +01:00
parent 9e1ac8fa5f
commit a18a9c5f70
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
local function spawn_tnt(pos, entname) local function spawn_tnt(pos, entname)
minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,}) minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,})
return minetest.add_entity(pos, entname) local tnt = minetest.add_entity(pos, entname)
tnt:set_armor_groups({immortal=1})
end end
local function activate_if_tnt(nname, np, tnt_np, tntr) local function activate_if_tnt(nname, np, tnt_np, tntr)