Improve teleport spell

This commit is contained in:
Signal 2025-09-19 14:58:47 -04:00
parent 71d58a4e48
commit ba17b7f195
2 changed files with 4 additions and 3 deletions

View file

@ -35,11 +35,12 @@ minetest.register_entity(":teleport_beacon", {
},
on_activate = function(e, name)
if name then e.owner = name end
if not ns.beacons[e.owner] or ns.beacons[e.owner].marker then
local b = ns.beacons[e.owner]
if not b or (b.marker and b.marker:is_valid()) then
e.object:remove()
return
end
ns.beacons[e.owner].marker = e.object
b.marker = e.object
e.object:set_armor_groups{immortal = 1}
e.object:set_animation({x=1,y=1}, 1.5, 0, false)
end,