diff --git a/mods/rp_mobs/task_templates.lua b/mods/rp_mobs/task_templates.lua index 83bd636e..64481c15 100644 --- a/mods/rp_mobs/task_templates.lua +++ b/mods/rp_mobs/task_templates.lua @@ -214,7 +214,6 @@ rp_mobs.microtasks.walk_straight = function(walk_speed, yaw, jump, max_timer) return rp_mobs.create_microtask({ label = label, on_start = function(self, mob) - minetest.log("error", "walk start") self.statedata.jumping = false -- is true when mob is currently jumpin self.statedata.jump_timer = 0 -- timer counting the time of the current jump, in seconds self.statedata.stop = false -- is set to true if microtask is supposed to be finished after the current step finishes diff --git a/mods/rp_mobs_mobs/boar.lua b/mods/rp_mobs_mobs/boar.lua index b719c970..2195f961 100644 --- a/mods/rp_mobs_mobs/boar.lua +++ b/mods/rp_mobs_mobs/boar.lua @@ -98,7 +98,11 @@ local find_land_from_liquid = function(pos) not is_walkable(upnode.name) then best_pos = up best_dist = dist - best_angle = angle_rad + local pos1 = vector.copy(startpos) + local pos2 = vector.copy(up) + pos1.y = 0 + pos2.y = 0 + best_angle = minetest.dir_to_yaw(vector.direction(pos1, pos2)) break end end @@ -156,7 +160,11 @@ local find_safe_node_from_pos = function(pos) if not best_dist or dist < best_dist then best_pos = up best_dist = dist - best_angle = angle_rad + local pos1 = vector.copy(startpos) + local pos2 = vector.copy(up) + pos1.y = 0 + pos2.y = 0 + best_angle = minetest.dir_to_yaw(vector.direction(pos1, pos2)) end break end