mirror of
https://github.com/minetest-mods/i3.git
synced 2025-06-30 07:30:28 +02:00
Safe teleport
This commit is contained in:
3
init.lua
3
init.lua
@ -2609,7 +2609,10 @@ i3.new_tab {
|
||||
local pos = vec_new(waypoint.pos)
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local vel = player:get_velocity()
|
||||
player:add_velocity(vec_mul(vel, -1))
|
||||
player:set_pos(pos)
|
||||
|
||||
msg(name, fmt("Teleported to %s", clr("#ff0", waypoint.name)))
|
||||
|
||||
elseif action == "refresh" then
|
||||
|
Reference in New Issue
Block a user