Improve teleport spell
This commit is contained in:
parent
71d58a4e48
commit
ba17b7f195
2 changed files with 4 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue