diff --git a/basis/fly_lib.lua b/basis/fly_lib.lua index e71ab05..a219463 100644 --- a/basis/fly_lib.lua +++ b/basis/fly_lib.lua @@ -475,7 +475,7 @@ minetest.register_entity("techage:move_item", { self.object:set_properties({wield_item = self.item}) --print("tbl.respawn", tbl.respawn) if tbl.respawn then - entity_to_node(self.start_pos, self.object) + entity_to_node(self.dest_pos, self.object) end end end, diff --git a/power/power_line.lua b/power/power_line.lua index 39c92cc..e5e5f2c 100644 --- a/power/power_line.lua +++ b/power/power_line.lua @@ -20,11 +20,13 @@ local Cable = techage.ElectricCable local power = networks.power local function can_dig(pos, digger) - if M(pos):get_string("owner") == digger:get_player_name() then - return true - end - if minetest.check_player_privs(digger:get_player_name(), "powerline") then - return true + if digger and digger:is_player() then + if M(pos):get_string("owner") == digger:get_player_name() then + return true + end + if minetest.check_player_privs(digger:get_player_name(), "powerline") then + return true + end end return false end