Remove weird schedule_removal in mcl_boats

This commit is contained in:
Wuzzy 2017-01-16 18:56:40 +01:00
parent 49020c7116
commit f2b5d5a5ad
2 changed files with 2 additions and 11 deletions

View file

@ -60,16 +60,16 @@ function boat.on_punch(self, puncher, time_from_last_punch, tool_capabilities, d
if self._driver then if self._driver then
self._driver:set_detach() self._driver:set_detach()
self._driver = nil self._driver = nil
boat.schedule_removal(self)
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
puncher:get_inventory():add_item("main", "mcl_boats:boat") puncher:get_inventory():add_item("main", "mcl_boats:boat")
end end
self.object:remove()
else else
boat.schedule_removal(self)
if not minetest.setting_getbool("creative_mode") then if not minetest.setting_getbool("creative_mode") then
puncher:get_inventory():add_item("main", "mcl_boats:boat") puncher:get_inventory():add_item("main", "mcl_boats:boat")
end end
self.object:remove()
end end
end end
@ -134,15 +134,6 @@ function boat.on_step(self, dtime)
end end
function boat.schedule_removal(self)
minetest.after(0.25,function()
self.object:remove()
end)
end
minetest.register_entity("mcl_boats:boat", boat) minetest.register_entity("mcl_boats:boat", boat)
minetest.register_craftitem("mcl_boats:boat", { minetest.register_craftitem("mcl_boats:boat", {