use add_velocity instead of deprecated add_player_velocity
This commit is contained in:
parent
9ff7fba74f
commit
1610019cc2
@ -93,7 +93,7 @@ minetest.register_craftitem("sumo:pushstick", {
|
|||||||
|
|
||||||
local pointed_name = pointed_thing.ref:get_player_name()
|
local pointed_name = pointed_thing.ref:get_player_name()
|
||||||
if not sumo.invincible[pointed_name] then
|
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
|
sumo.timeouts[p_name] = current_time
|
||||||
|
|
||||||
local sound = 'thwack2' --TODO: get the other 2 thwack souds into the game (where did they go anyways?!)
|
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
|
--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}))
|
local force = 10 * vector.length(vector.normalize( {x=lookvect.x, z=lookvect.z, y= 0}))
|
||||||
sumo.jumpouts[p_name] = current_time
|
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
|
--update the staff time for next check
|
||||||
local sound = 'jump'..math.random(1,2)
|
local sound = 'jump'..math.random(1,2)
|
||||||
minetest.sound_play(sound, {
|
minetest.sound_play(sound, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user