]> git.lizzy.rs Git - Crafter.git/commitdiff
Make mobs run directly at you when close
authoroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 23 May 2020 03:56:31 +0000 (23:56 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 23 May 2020 03:56:31 +0000 (23:56 -0400)
mods/mob/api/movement.lua

index 1f2e07ca6ab3e65f8f212b70d1ff0fe10c362c29..fa7d3cac5acc409ccd5fa6377d5e8a5915ca6a3d 100644 (file)
@@ -189,7 +189,7 @@ mobs.create_movement_functions = function(def,mob_register)
                                        local path = minetest.find_path(self.object:get_pos(),self.following_pos,self.view_distance*2,1,1,"A*")
                                        if path then--or (self.path_data and table.getn(self.path_data) < 3)) then
                                                self.path_data = path
-                                       elseif not path and self.path_data and table.getn(self.path_data) <= 2 then
+                                       elseif not path and self.path_data and table.getn(self.path_data) <= 4 then
                                                self.path_data = nil
                                        end