merge beacon-branch into fork beacon branch #7

Merged
chmodsayshello merged 453 commits from VoxeLibre/VoxeLibre:beacons into beacon-"fork" 2022-07-23 11:30:49 +02:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit f2c2f4106b - Show all commits

View File

@ -200,7 +200,7 @@ function ARROW_ENTITY.on_step(self, dtime)
local arrow_dir = vector.rotate(vector.new(0,0,1), self.object:get_rotation()) local arrow_dir = vector.rotate(vector.new(0,0,1), self.object:get_rotation())
local raycast = minetest.raycast(pos, vector.add(pos, vector.multiply(arrow_dir, 6)), true, false) local raycast = minetest.raycast(pos, vector.add(pos, vector.multiply(arrow_dir, 6)), true, false)
for hitpoint in raycast do for hitpoint in raycast do
if hitpoint.type == "object" and hitpoint.ref ~= self._shooter then if hitpoint.type == "object" then
local ok = false local ok = false
if hitpoint.ref:is_player() then if hitpoint.ref:is_player() then
ok = true ok = true
@ -299,6 +299,8 @@ function ARROW_ENTITY.on_step(self, dtime)
minetest.after(150, function() minetest.after(150, function()
self.object:remove() self.object:remove()
end) end)
else
self.object:remove()
end end
end end
end end