diff options
author | SmallJoker <mk939@ymail.com> | 2018-07-03 22:14:32 +0200 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-07-03 22:14:32 +0200 |
commit | 1a396c707c6af22f3067f47df1790ce7fe56d90c (patch) | |
tree | 3c9f88aa6a6d94fba8e5aa104a39a87c7061c40f | |
parent | ea94718a9a4acb427c82f6ef6734a5e6c59a9bc4 (diff) |
Add is_player to fakePlayer. Prevents grabAndFire-related crashes
-rw-r--r-- | filter-injector.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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) |