diff --git a/api/api.lua b/api/api.lua index 95efc65..8079529 100644 --- a/api/api.lua +++ b/api/api.lua @@ -595,12 +595,13 @@ function animalia.mount(self, player, params) player:set_attach(self.object, "Torso", params.pos, params.rot) player:set_eye_offset({x = 0, y = 25, z = 0}, {x = 0, y = 15, z = 15}) self:clear_utility() - minetest.after(0.3, function() + minetest.after(0.4, function() animate_player(player, "sit" , 30) end) end function animalia.punch(self, puncher, ...) + if self.hp <= 0 then return end creatura.basic_punch_func(self, puncher, ...) self._puncher = puncher if self.flee_puncher diff --git a/mobs/fox.lua b/mobs/fox.lua index eea2d24..7372bc9 100644 --- a/mobs/fox.lua +++ b/mobs/fox.lua @@ -2,7 +2,7 @@ -- Fox -- --------- -local vec_dir, vec_dist = vector.direction, vector.direction +local vec_dir, vec_dist = vector.direction, vector.distance local dir2yaw = minetest.dir_to_yaw local function get_food_pos(self) diff --git a/mobs/horse.lua b/mobs/horse.lua index cc60a01..3003d77 100644 --- a/mobs/horse.lua +++ b/mobs/horse.lua @@ -132,6 +132,7 @@ creatura.register_mob("animalia:horse", { fancy_collide = false, -- Animalia Props + group_wander = true, catch_with_net = true, catch_with_lasso = true, consumable_nodes = { @@ -147,7 +148,7 @@ creatura.register_mob("animalia:horse", { }, utility_stack = { { - utility = "animalia:wander_group", + utility = "animalia:wander", step_delay = 0.25, get_score = function(self) return 0.1, {self} diff --git a/mobs/wolf.lua b/mobs/wolf.lua index 579619c..b3754d1 100644 --- a/mobs/wolf.lua +++ b/mobs/wolf.lua @@ -76,6 +76,7 @@ creatura.register_mob("animalia:wolf", { follow = follow, -- Animalia Props + skittish_wander = true, assist_owner = true, flee_puncher = false, catch_with_net = true, @@ -91,7 +92,7 @@ creatura.register_mob("animalia:wolf", { -- Functions utility_stack = { { - utility = "animalia:wander_skittish", + utility = "animalia:wander", step_delay = 0.25, get_score = function(self) return 0.1, {self}