forked from VoxeLibre/VoxeLibre
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
|
@ -3131,7 +3131,7 @@ local do_states = function(self, dtime)
|
||||||
|
|
||||||
if self.shoot_interval
|
if self.shoot_interval
|
||||||
and self.timer > 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
|
and random(1, 100) <= 60 then
|
||||||
|
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
|
|
Loading…
Reference in New Issue