1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 04:40:22 +02:00

Fix deprecated get_player_velocity and set_physics_override calls (#2770)

This commit is contained in:
SmallJoker
2020-11-04 21:42:35 +01:00
committed by GitHub
parent 720d4c8e3f
commit 331bbae058
2 changed files with 4 additions and 5 deletions

View File

@ -165,7 +165,7 @@ local function entity_physics(pos, radius, drops)
if obj:is_player() then
local dir = vector.normalize(vector.subtract(obj_pos, pos))
local moveoff = vector.multiply(dir, 2 / dist * radius)
obj:add_player_velocity(moveoff)
obj:add_velocity(moveoff)
obj:set_hp(obj:get_hp() - damage)
else