]> git.lizzy.rs Git - Crafter.git/commitdiff
Make /home stop player from moving
authoroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 20 Jun 2020 17:59:45 +0000 (13:59 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 20 Jun 2020 17:59:45 +0000 (13:59 -0400)
mods/server_utilities/init.lua

index bd9183476055701e8b2374523db1a4b0295f33ab..be75286384b6509f5b73ceddfefd222ec1607b78 100644 (file)
@@ -44,6 +44,7 @@ minetest.register_chatcommand("home", {
                        local newpos = minetest.deserialize(mod_storage:get_string(name.."home"))
                        
                        if newpos then
+                               player:add_player_velocity(vector.mulitply(player:get_player_velocity(),-1))
                                player:move_to(newpos)
                                pool[name] = time
                        else