From 1a396c707c6af22f3067f47df1790ce7fe56d90c Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Tue, 3 Jul 2018 22:14:32 +0200 Subject: [PATCH] Add is_player to fakePlayer. Prevents grabAndFire-related crashes --- filter-injector.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filter-injector.lua b/filter-injector.lua index 0f651fb..dd3883d 100644 --- a/filter-injector.lua +++ b/filter-injector.lua @@ -170,7 +170,8 @@ local function punch_filter(data, filtpos, filtnode, msg) local fakePlayer = { get_player_name = delay(owner), is_fake_player = ":pipeworks", - get_wielded_item = delay(ItemStack(nil)) + get_wielded_item = delay(ItemStack(nil)), + is_player = delay(true) } -- TODO: use a mechanism as the wielder one local dir = pipeworks.facedir_to_right_dir(filtnode.param2) local frompos = vector.subtract(filtpos, dir)