载具不能变成物品,更加真实

This commit is contained in:
zaoqi 2017-01-26 15:41:47 +08:00
parent ac7753852d
commit 11f7d54ebc

View File

@ -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