From 0d49ac7dcc0b1ed1cc49f452d2568601bb33b3ac Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Fri, 7 Jun 2024 17:39:23 -0300 Subject: [PATCH] fix destroy method --- automobiles_lib/init.lua | 2 +- automobiles_motorcycle/motorcycle_utilities.lua | 2 +- automobiles_vespa/vespa_utilities.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automobiles_lib/init.lua b/automobiles_lib/init.lua index 3affb0b..bac6756 100755 --- a/automobiles_lib/init.lua +++ b/automobiles_lib/init.lua @@ -528,7 +528,7 @@ function automobiles_lib.destroy(self, puncher) local lua_ent = self.object:get_luaentity() local staticdata = lua_ent:get_staticdata(self) local obj_name = lua_ent.name - local player = minetest.get_player_by_name(self.owner) + local player = puncher local stack = ItemStack(obj_name) local stack_meta = stack:get_meta() diff --git a/automobiles_motorcycle/motorcycle_utilities.lua b/automobiles_motorcycle/motorcycle_utilities.lua index 94572b2..290930d 100755 --- a/automobiles_motorcycle/motorcycle_utilities.lua +++ b/automobiles_motorcycle/motorcycle_utilities.lua @@ -45,7 +45,7 @@ function motorcycle.destroy(self, puncher) local lua_ent = self.object:get_luaentity() local staticdata = lua_ent:get_staticdata(self) local obj_name = lua_ent.name - local player = minetest.get_player_by_name(self.owner) + local player = puncher local stack = ItemStack(obj_name) local stack_meta = stack:get_meta() diff --git a/automobiles_vespa/vespa_utilities.lua b/automobiles_vespa/vespa_utilities.lua index 9ef22ad..22dc3ee 100755 --- a/automobiles_vespa/vespa_utilities.lua +++ b/automobiles_vespa/vespa_utilities.lua @@ -45,7 +45,7 @@ function vespa.destroy(self, puncher) local lua_ent = self.object:get_luaentity() local staticdata = lua_ent:get_staticdata(self) local obj_name = lua_ent.name - local player = minetest.get_player_by_name(self.owner) + local player = puncher local stack = ItemStack(obj_name) local stack_meta = stack:get_meta()