From 1a6a9ecf0f6bb460cb0e5a3ca91f9a6a40bda604 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 12 Jun 2017 23:56:48 +0200 Subject: [PATCH] Remove some dangerous minetest.after in mcl_boats --- mods/ITEMS/mcl_boats/init.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_boats/init.lua b/mods/ITEMS/mcl_boats/init.lua index 4db247fde2..9aeb0e6e03 100644 --- a/mods/ITEMS/mcl_boats/init.lua +++ b/mods/ITEMS/mcl_boats/init.lua @@ -67,9 +67,7 @@ function boat.on_rightclick(self, clicker) mcl_player.player_set_animation(clicker, "stand" , 30) local pos = clicker:getpos() pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} - minetest.after(0.1, function() - clicker:setpos(pos) - end) + clicker:setpos(pos) elseif not self.driver then local attach = clicker:get_attach() if attach and attach:get_luaentity() then @@ -127,10 +125,7 @@ function boat.on_punch(self, puncher) if not minetest.setting_getbool("creative_mode") then minetest.add_item(self.object:getpos(), leftover) end - -- delay remove to ensure player is detached - minetest.after(0.1, function() - self.object:remove() - end) + self.object:remove() end end