forked from MineClone5/MineClone5
Remove arrow entities when the player leaves to prevent killing on startup
This commit is contained in:
parent
ad06c5490c
commit
263bb1607d
|
@ -419,6 +419,10 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
self.object:set_rotation({ x = 0, y = yaw, z = pitch })
|
self.object:set_rotation({ x = 0, y = yaw, z = pitch })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self._in_player and not self.object:get_attach() then
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
|
||||||
-- Update internal variable
|
-- Update internal variable
|
||||||
self._lastpos={x=pos.x, y=pos.y, z=pos.z}
|
self._lastpos={x=pos.x, y=pos.y, z=pos.z}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue