From f2b5d5a5ad75682e0f238e7c415a4ffa91aec18b Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 16 Jan 2017 18:56:40 +0100 Subject: [PATCH] Remove weird schedule_removal in mcl_boats --- mods/mcl_boats/init.lua | 13 ++----------- .../models/{mcl_boat_base.x => mcl_boats_base.x} | 0 2 files changed, 2 insertions(+), 11 deletions(-) rename mods/mcl_boats/models/{mcl_boat_base.x => mcl_boats_base.x} (100%) diff --git a/mods/mcl_boats/init.lua b/mods/mcl_boats/init.lua index 1ef583a52..defc2d5e7 100644 --- a/mods/mcl_boats/init.lua +++ b/mods/mcl_boats/init.lua @@ -60,16 +60,16 @@ function boat.on_punch(self, puncher, time_from_last_punch, tool_capabilities, d if self._driver then self._driver:set_detach() self._driver = nil - boat.schedule_removal(self) if not minetest.setting_getbool("creative_mode") then puncher:get_inventory():add_item("main", "mcl_boats:boat") end + self.object:remove() else - boat.schedule_removal(self) if not minetest.setting_getbool("creative_mode") then puncher:get_inventory():add_item("main", "mcl_boats:boat") end + self.object:remove() end end @@ -134,15 +134,6 @@ function boat.on_step(self, dtime) 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_craftitem("mcl_boats:boat", { diff --git a/mods/mcl_boats/models/mcl_boat_base.x b/mods/mcl_boats/models/mcl_boats_base.x similarity index 100% rename from mods/mcl_boats/models/mcl_boat_base.x rename to mods/mcl_boats/models/mcl_boats_base.x