From 6ccfd5226739c2f0567c10beea4fa4fc4c795071 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Mon, 31 May 2021 21:50:43 +0200 Subject: [PATCH] Safe teleport --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 9766d6c..09e6872 100644 --- a/init.lua +++ b/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