载具不能变成物品,更加真实
This commit is contained in:
parent
ac7753852d
commit
11f7d54ebc
7
api.lua
7
api.lua
@ -521,12 +521,7 @@ function vehicles.explodinate(ent, radius)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function vehicles.on_punch(self, puncher)
|
function vehicles.on_punch(self, puncher)
|
||||||
if not self.driver then
|
if self.object:get_hp() == 0 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.driver then
|
if self.driver then
|
||||||
object_detach(self, self.driver, {x=1, y=0, z=1})
|
object_detach(self, self.driver, {x=1, y=0, z=1})
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user