mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Remove arrow entities when the player leaves to prevent killing on startup
This commit is contained in:
parent
e3129b057f
commit
7b47a15e34
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue