Keep pos param

This commit is contained in:
Niklp09 2023-10-22 18:00:39 +02:00
parent b10612355f
commit a1a9724e15
1 changed files with 4 additions and 3 deletions

View File

@ -308,18 +308,19 @@ minetest.register_entity("3d_armor_stand:armor_entity", {
collisionbox = {0,0,0,0,0,0},
textures = {"3d_armor_trans.png"},
},
_pos = nil
on_activate = function(self)
local pos = self.object:get_pos()
if pos then
self.pos = vector.round(pos)
self._pospos = vector.round(pos)
update_entity(pos)
end
end,
on_blast = function(self, damage)
local drops = {}
local node = minetest.get_node(self.pos)
local node = minetest.get_node(self._pos)
if node.name == "3d_armor_stand:armor_stand" then
drop_armor(self.pos)
drop_armor(self._pos)
self.object:remove()
end
return false, false, drops