Merge pull request #21 from berengma/dev

fix animations, add snake on menu
This commit is contained in:
Gundul 2020-08-23 12:30:45 +02:00 committed by GitHub
commit 584809dc7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 8 deletions

View File

@ -446,7 +446,11 @@ end
--just hanging around
function aerotest.hq_idle(self,prty,now)
local init = true
local func = function(self)
if init then mobkit.animate(self,"idle") end
if mobkit.timer(self,1) or now then
self.action = "idle"
@ -456,7 +460,7 @@ function aerotest.hq_idle(self,prty,now)
local startangle = 0
local found = false
local pos2 = {}
mobkit.animate(self,"idle")
local wait = random(10) + 5
if mobkit.timer(self,wait) or now then
@ -483,6 +487,7 @@ function aerotest.hq_idle(self,prty,now)
end
end
end
init = false
end
mobkit.queue_high(self,func,prty)
end

View File

@ -24,7 +24,7 @@ minetest.register_entity('aerotest:eagle',{
makes_footstep_sound = false,
timeout=300, -- 24h
buoyancy = 0.7,
static_save = true,
static_save = false,
view_range = water_life.abr*32, -- 32 because mobkit's self.near_objects only checks until half self.view_range !!!
max_hp = 100,
hunger = 100,

View File

@ -39,6 +39,7 @@ end
--aerotest.register_prey("water_life:fish") -- no hunting of watermobs sofar
--aerotest.register_prey("water_life:fish_tamed")
aerotest.register_prey("water_life:snake")
--prey of wildlife mod

BIN
models/aerotest_gull.b3d Normal file

Binary file not shown.

View File

@ -18,7 +18,7 @@ function aerotest.spawnstep(dtime)
local yaw = plyr:get_look_horizontal()
local animal = water_life.count_objects(pos,nil,"aerotest:eagle")
if animal.name < aerotest.maxeagle then
if not animal["areotest:eagle"] or animal["areotest:eagle"] < aerotest.maxeagle then
pos = mobkit.pos_translate2d(pos,yaw+rad(random(-55,55)),random(10,aerotest.abr))
local spawnpos = {x=pos.x, y=pos.y + random(aerotest.abr/2,aerotest.abr), z=pos.z}
@ -36,11 +36,6 @@ function aerotest.spawnstep(dtime)
end
end
--[[
local nodes = minetest.find_nodes_in_area_under_air(pos1, pos2, {"group:wall","group:tree","group:leaves","group:fence"})
nodes = cleanup(nodes)
if nodes then minetest.chat_send_all(dump(#nodes).." left") end
]]
end
end
spawntimer = 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB