1
0
Fork 0

Fix and overhaul wolves

This commit is contained in:
jordan4ibanez 2021-04-22 23:30:32 -04:00
parent aac1e19336
commit 408296140a
2 changed files with 12 additions and 3 deletions

View File

@ -129,7 +129,14 @@ end
mobs.group_attack_initialization = function(self)
--get basic data
local friends_list = table_copy(self.group_attack)
local friends_list
if self.group_attack == true then
friends_list = {self.name}
else
friends_list = table_copy(self.group_attack)
end
local objects_in_area = minetest_get_objects_inside_radius(self.object:get_pos(), self.view_range)
--get the player's name

View File

@ -22,13 +22,15 @@ local wolf = {
type = "animal",
spawn_class = "passive",
can_despawn = true,
neutral = true,
hp_min = 8,
hp_max = 8,
xp_min = 1,
xp_max = 3,
rotate = 270,
passive = false,
group_attack = true,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
collisionbox = {-0.3, -0.00, -0.3, 0.3, 0.85, 0.3},
visual = "mesh",
mesh = "mobs_mc_wolf.b3d",
textures = {
@ -52,7 +54,7 @@ local wolf = {
run_velocity = 3,
damage = 4,
reach = 2,
attack_type = "dogfight",
attack_type = "punch",
fear_height = 4,
follow = mobs_mc.follow.wolf,
on_rightclick = function(self, clicker)