Remove arrow entities when the player leaves to prevent killing on startup

NO411 2021-12-30 14:04:53 +01:00
parent e3129b057f
commit 7b47a15e34

@ -419,6 +419,10 @@ function ARROW_ENTITY.on_step(self, dtime)
self.object:set_rotation({ x = 0, y = yaw, z = pitch })
end
if self._in_player and not self.object:get_attach() then
self.object:remove()
end
-- Update internal variable
self._lastpos={x=pos.x, y=pos.y, z=pos.z}
end