From 11f7d54ebc43f1a8ffd725859b59b1c47f797a8b Mon Sep 17 00:00:00 2001 From: zaoqi Date: Thu, 26 Jan 2017 15:41:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=BD=E5=85=B7=E4=B8=8D=E8=83=BD=E5=8F=98?= =?UTF-8?q?=E6=88=90=E7=89=A9=E5=93=81=EF=BC=8C=E6=9B=B4=E5=8A=A0=E7=9C=9F?= =?UTF-8?q?=E5=AE=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/api.lua b/api.lua index f7459a8..29f5e6b 100644 --- a/api.lua +++ b/api.lua @@ -521,12 +521,7 @@ function vehicles.explodinate(ent, radius) end function vehicles.on_punch(self, puncher) - if not self.driver then - local name = self.object:get_luaentity().name - local pos = self.object:getpos() - minetest.env:add_item(pos, name.."_spawner") - self.object:remove() - elseif self.object:get_hp() == 0 then + if self.object:get_hp() == 0 then if self.driver then object_detach(self, self.driver, {x=1, y=0, z=1}) end