Skip to content

Commit 6e737a5

Browse files
authored
Merge pull request #7 from berengma/try
Try
2 parents 1886dc9 + 4643f07 commit 6e737a5

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

behaviors.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function wildcow.hq_meetmygirl(self,prty)
123123
if passangan == {} then return true end
124124
tpos = passangan:get_pos()
125125
--water_life.temp_show(tpos,5,5)
126-
if not water_life.gopath(self,tpos,nil,true) then
126+
if not water_life.gopath(self,tpos,nil,wildcow.fast_pf) then
127127
--minetest.chat_send_all("No way to there")
128128
return true
129129
end
@@ -205,7 +205,7 @@ function wildcow.hq_goto(self,prty,tpos)
205205
local func = function(self)
206206
if mobkit.is_queue_empty_low(self) and self.isonground then
207207
local pos = mobkit.get_stand_pos(self)
208-
if vector.distance(pos,tpos) >= 1.2 then --1.2
208+
if vector.distance(pos,tpos) >= 3 then --1.2
209209
wildcow.goto_next_waypoint(self,tpos)
210210
else
211211
return true
@@ -258,10 +258,10 @@ function wildcow.hq_find_food(self,prty,radius)
258258

259259
if mobkit.is_queue_empty_low(self) and self.isonground then
260260

261-
if vector.distance(pos,snack) > 2 then
261+
if vector.distance(pos,snack) > 1.5 then
262262
if init then
263263
--wildcow.hq_goto(self,prty+1,snack)
264-
water_life.hq_findpath(self,prty+1,snack, 2,0.5,true)
264+
water_life.hq_findpath(self,prty+1,snack, 1.5,0.5,wildcow.fast_pf)
265265
init=false
266266
end
267267
else

calf.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ local function calf_brain(self)
7676
local boss = math.floor(vector.distance(pos,bosspos))
7777
--minetest.chat_send_all(dump(boss))
7878
if boss > 5 then
79-
water_life.hq_findpath(self,10,bosspos, 3,0.5,true)
79+
water_life.hq_findpath(self,10,bosspos, 3,0.5,wildcow.fast_pf)
8080
end
8181
end
8282

@@ -93,7 +93,7 @@ minetest.register_entity("wildcow:auroch_calf",{
9393
physical = true,
9494
stepheight = 0.1, --EVIL!
9595
collide_with_objects = false,
96-
collisionbox = {-0.45, 0, -0.45, 0.45, 0.95, 0.45},
96+
collisionbox = {-0.35, 0, -0.35, 0.35, 0.75, 0.35},
9797
visual = "mesh",
9898
mesh = "wildcow_auroch_calf.b3d",
9999
textures = {"wildcow_auroch_calf_male.png"},

female.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ local function female_brain(self)
167167
local boss = math.floor(vector.distance(pos,bosspos))
168168
--minetest.chat_send_all(dump(boss))
169169
if boss > 10 then
170-
water_life.hq_findpath(self,5,bosspos, 7,0.5,true)
170+
water_life.hq_findpath(self,5,bosspos, 7,0.5,wildcow.fast_pf)
171171
end
172172
end
173173

@@ -184,7 +184,7 @@ minetest.register_entity("wildcow:auroch_female",{
184184
physical = true,
185185
stepheight = 0.1, --EVIL!
186186
collide_with_objects = false,
187-
collisionbox = {-0.45, 0, -0.45, 0.45, 0.85, 0.45},
187+
collisionbox = {-0.35, 0, -0.35, 0.35, 0.85, 0.35},
188188
visual = "mesh",
189189
mesh = "wildcow_auroch_female.b3d",
190190
textures = {"wildcow_auroch_female.png"},

init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ local path = minetest.get_modpath(minetest.get_current_modname())
1111
wildcow = {}
1212
wildcow.spawnfreq = 30 -- spawn frequency
1313
wildcow.herdsize = 5 -- max member in a herd
14-
wildcow.ptime = 720 -- time in secs until baby is born
15-
wildcow.btime = 1440 -- time needed for a calf to grew up to an adult
14+
wildcow.ptime = 360 -- time in secs until baby is born
15+
wildcow.btime = 720 -- time needed for a calf to grew up to an adult
1616
wildcow.lifetime = (wildcow.btime+wildcow.ptime)*4 -- lifetime in seconds
17+
wildcow.fast_pf = false -- faster pathfinding (false is better but slower)
1718
wildcow.debug = false -- show debug
1819

1920

male.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ local function male_brain(self)
2828
local horny = water_life.horny(self)
2929
local hunger = water_life.hunger(self)
3030

31-
if prty < 30 and water_life.is_boss(self) == 1 and horny < 70 and hunger > horny then
31+
if prty < 30 and water_life.is_boss(self) == 1 and horny < 80 and hunger > horny then
3232
mobkit.clear_queue_high(self)
3333
wildcow.hq_meetmygirl(self,8)
3434
end
@@ -141,7 +141,7 @@ local function male_brain(self)
141141
local boss = math.floor(vector.distance(pos,bosspos))
142142
--minetest.chat_send_all(dump(boss))
143143
if boss > 10 then
144-
water_life.hq_findpath(self,5,bosspos, 7,0.5,true)
144+
water_life.hq_findpath(self,5,bosspos, 7,0.5,wildcow.fast_pf)
145145
end
146146
end
147147

@@ -158,7 +158,7 @@ minetest.register_entity("wildcow:auroch_male",{
158158
physical = true,
159159
stepheight = 0.1, --EVIL!
160160
collide_with_objects = false,
161-
collisionbox = {-0.45, 0, -0.45, 0.45, 0.85, 0.45},
161+
collisionbox = {-0.35, 0, -0.35, 0.35, 0.85, 0.35},
162162
visual = "mesh",
163163
mesh = "wildcow_auroch_male.b3d",
164164
textures = {"wildcow_auroch_male.png"},

0 commit comments

Comments
 (0)