Cancel player velocity when teleporting

master
Zughy 2022-06-07 15:05:53 +02:00
parent 4fd77857d8
commit 6bd14cf1f3
1 changed files with 1 additions and 0 deletions

View File

@ -145,6 +145,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
-- teletrasporto e chiudo
player:add_velocity(vector.multiply(player:get_velocity(), -1))
player:set_pos(minetest.string_to_pos(item.pos))
minetest.sound_play("magiccompass_teleport", {
to_player = p_name