mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
make shooting mobs calculate raycast bool for shooting with shoot_offset
Basically makes skeletons accurately when to shoot and when not to.
This commit is contained in:
parent
65289de86e
commit
306db6b609
1 changed files with 1 additions and 1 deletions
|
@ -3131,7 +3131,7 @@ local do_states = function(self, dtime)
|
|||
|
||||
if self.shoot_interval
|
||||
and self.timer > self.shoot_interval
|
||||
and not minetest.raycast(p, self.attack:get_pos(), false, false):next()
|
||||
and not minetest.raycast(vector.add(p, vector.new(0,self.shoot_offset,0)), vector.add(self.attack:get_pos(), vector.new(0,1.5,0)), false, false):next()
|
||||
and random(1, 100) <= 60 then
|
||||
|
||||
self.timer = 0
|
||||
|
|
Loading…
Reference in a new issue