Use moveto rather than setpos for the grappling hook. This makes the movement while using the grappling hook look more realistic to other players.

This commit is contained in:
PenguinDad 2014-07-26 23:39:38 +02:00
parent 72e87d3b2a
commit 0f4d8f18e3

View file

@ -52,7 +52,7 @@ minetest.register_entity("shooter:hook", {
self.object:setacceleration({x=0, y=0, z=0})
if minetest.get_item_group(node.name, "liquid") == 0 and
minetest.get_node(pos).name == "air" then
self.player:setpos(pos)
self.player:moveto(pos)
end
if minetest.get_item_group(node.name, "lava") == 0 then
minetest.add_item(pos, self.itemstack)