Safe teleport
This commit is contained in:
parent
d392f04c11
commit
6ccfd52267
3
init.lua
3
init.lua
|
@ -2609,7 +2609,10 @@ i3.new_tab {
|
||||||
local pos = vec_new(waypoint.pos)
|
local pos = vec_new(waypoint.pos)
|
||||||
pos.y = pos.y + 0.5
|
pos.y = pos.y + 0.5
|
||||||
|
|
||||||
|
local vel = player:get_velocity()
|
||||||
|
player:add_velocity(vec_mul(vel, -1))
|
||||||
player:set_pos(pos)
|
player:set_pos(pos)
|
||||||
|
|
||||||
msg(name, fmt("Teleported to %s", clr("#ff0", waypoint.name)))
|
msg(name, fmt("Teleported to %s", clr("#ff0", waypoint.name)))
|
||||||
|
|
||||||
elseif action == "refresh" then
|
elseif action == "refresh" then
|
||||||
|
|
Ŝarĝante…
Reference in New Issue