From bb25210dd00e522b1dc141115a22a916aaa31c6e Mon Sep 17 00:00:00 2001 From: luk3yx Date: Mon, 14 Feb 2022 01:46:27 +1300 Subject: [PATCH] Make core.item_drop work properly with pipeworks (#32) get_player_velocity is deprecated --- builtin/game/item.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/game/item.lua b/builtin/game/item.lua index cf8f7751f..dc165a7a3 100644 --- a/builtin/game/item.lua +++ b/builtin/game/item.lua @@ -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