Make core.item_drop work properly with pipeworks (#32)

get_player_velocity is deprecated
master
luk3yx 2022-02-14 01:46:27 +13:00 committed by GitHub
parent 2102765483
commit bb25210dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -541,7 +541,7 @@ function core.item_drop(itemstack, dropper, pos)
local obj = core.add_item(p, item)
if obj then
if dropper_is_player then
local vel = dropper:get_player_velocity()
local vel = dropper.get_velocity and dropper:get_velocity() or vnew
local dir = dropper:get_look_dir()
dir.x = vel.x + dir.x * 4
dir.y = vel.y + dir.y * 4 + 2