From 1610019cc28441853c2cc4ea39fcdc208bcff219 Mon Sep 17 00:00:00 2001 From: Zughy <4279489-marco_a@users.noreply.gitlab.com> Date: Thu, 2 Feb 2023 11:43:59 +0000 Subject: [PATCH] use add_velocity instead of deprecated add_player_velocity --- items.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/items.lua b/items.lua index 71d4847..3115638 100644 --- a/items.lua +++ b/items.lua @@ -93,7 +93,7 @@ minetest.register_craftitem("sumo:pushstick", { local pointed_name = pointed_thing.ref:get_player_name() if not sumo.invincible[pointed_name] then - pointed_thing.ref:add_player_velocity(vector.multiply(dir, force)) + pointed_thing.ref:add_velocity(vector.multiply(dir, force)) sumo.timeouts[p_name] = current_time local sound = 'thwack2' --TODO: get the other 2 thwack souds into the game (where did they go anyways?!) @@ -143,7 +143,7 @@ minetest.register_craftitem("sumo:pushstick", { --gives a unit vector that is 90 deg offset in the vert direction local force = 10 * vector.length(vector.normalize( {x=lookvect.x, z=lookvect.z, y= 0})) sumo.jumpouts[p_name] = current_time - placer:add_player_velocity(vector.multiply(pushvect, force)) + placer:add_velocity(vector.multiply(pushvect, force)) --update the staff time for next check local sound = 'jump'..math.random(1,2) minetest.sound_play(sound, {