master #5

Merged
epCode merged 255 commits from VoxeLibre/VoxeLibre:master into master 2021-02-02 23:20:01 +01:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit 52ed7f668e - Show all commits

View File

@ -2764,8 +2764,12 @@ local do_states = function(self, dtime)
set_velocity(self, 0)
local p = self.object:get_pos()
p.y = p.y + (self.collisionbox[2] + self.collisionbox[5]) / 2
if self.shoot_interval
and self.timer > self.shoot_interval
and not minetest.raycast(p, self.attack:get_pos(), false, false):next()
and random(1, 100) <= 60 then
self.timer = 0
@ -2774,12 +2778,8 @@ local do_states = function(self, dtime)
-- play shoot attack sound
mob_sound(self, "shoot_attack")
local p = self.object:get_pos()
p.y = p.y + (self.collisionbox[2] + self.collisionbox[5]) / 2
-- Shoot arrow
if not minetest.raycast(self.object:get_pos(), self.attack:get_pos(), false, false):next() and minetest.registered_entities[self.arrow] then
if minetest.registered_entities[self.arrow] then
local arrow, ent
local v = 1