diff --git a/behaviors.lua b/behaviors.lua index 6cc649f..84bb357 100644 --- a/behaviors.lua +++ b/behaviors.lua @@ -123,7 +123,7 @@ function wildcow.hq_meetmygirl(self,prty) if passangan == {} then return true end tpos = passangan:get_pos() --water_life.temp_show(tpos,5,5) - if not water_life.gopath(self,tpos,nil,true) then + if not water_life.gopath(self,tpos,nil,wildcow.fast_pf) then --minetest.chat_send_all("No way to there") return true end @@ -205,7 +205,7 @@ function wildcow.hq_goto(self,prty,tpos) local func = function(self) if mobkit.is_queue_empty_low(self) and self.isonground then local pos = mobkit.get_stand_pos(self) - if vector.distance(pos,tpos) >= 1.2 then --1.2 + if vector.distance(pos,tpos) >= 3 then --1.2 wildcow.goto_next_waypoint(self,tpos) else return true @@ -258,10 +258,10 @@ function wildcow.hq_find_food(self,prty,radius) if mobkit.is_queue_empty_low(self) and self.isonground then - if vector.distance(pos,snack) > 2 then + if vector.distance(pos,snack) > 1.5 then if init then --wildcow.hq_goto(self,prty+1,snack) - water_life.hq_findpath(self,prty+1,snack, 2,0.5,true) + water_life.hq_findpath(self,prty+1,snack, 1.5,0.5,wildcow.fast_pf) init=false end else diff --git a/calf.lua b/calf.lua index e0d2b76..6e6b403 100644 --- a/calf.lua +++ b/calf.lua @@ -76,7 +76,7 @@ local function calf_brain(self) local boss = math.floor(vector.distance(pos,bosspos)) --minetest.chat_send_all(dump(boss)) if boss > 5 then - water_life.hq_findpath(self,10,bosspos, 3,0.5,true) + water_life.hq_findpath(self,10,bosspos, 3,0.5,wildcow.fast_pf) end end diff --git a/female.lua b/female.lua index 9c030cc..65a6118 100644 --- a/female.lua +++ b/female.lua @@ -167,7 +167,7 @@ local function female_brain(self) local boss = math.floor(vector.distance(pos,bosspos)) --minetest.chat_send_all(dump(boss)) if boss > 10 then - water_life.hq_findpath(self,5,bosspos, 7,0.5,true) + water_life.hq_findpath(self,5,bosspos, 7,0.5,wildcow.fast_pf) end end diff --git a/init.lua b/init.lua index de759b3..f4c77ec 100644 --- a/init.lua +++ b/init.lua @@ -11,9 +11,10 @@ local path = minetest.get_modpath(minetest.get_current_modname()) wildcow = {} wildcow.spawnfreq = 30 -- spawn frequency wildcow.herdsize = 5 -- max member in a herd -wildcow.ptime = 720 -- time in secs until baby is born -wildcow.btime = 1440 -- time needed for a calf to grew up to an adult +wildcow.ptime = 360 -- time in secs until baby is born +wildcow.btime = 720 -- time needed for a calf to grew up to an adult wildcow.lifetime = (wildcow.btime+wildcow.ptime)*4 -- lifetime in seconds +wildcow.fast_pf = false -- faster pathfinding (false is better but slower) wildcow.debug = false -- show debug diff --git a/male.lua b/male.lua index c236453..c9eef5b 100644 --- a/male.lua +++ b/male.lua @@ -28,7 +28,7 @@ local function male_brain(self) local horny = water_life.horny(self) local hunger = water_life.hunger(self) - if prty < 30 and water_life.is_boss(self) == 1 and horny < 70 and hunger > horny then + if prty < 30 and water_life.is_boss(self) == 1 and horny < 80 and hunger > horny then mobkit.clear_queue_high(self) wildcow.hq_meetmygirl(self,8) end @@ -141,7 +141,7 @@ local function male_brain(self) local boss = math.floor(vector.distance(pos,bosspos)) --minetest.chat_send_all(dump(boss)) if boss > 10 then - water_life.hq_findpath(self,5,bosspos, 7,0.5,true) + water_life.hq_findpath(self,5,bosspos, 7,0.5,wildcow.fast_pf) end end