add timers on owl and nyan
This commit is contained in:
parent
23e608eda7
commit
232e59a2f9
@ -43,7 +43,13 @@ mobs:register_mob("dmobs:nyan", {
|
||||
run_end = 7,
|
||||
|
||||
},
|
||||
do_custom = function(self)
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
self.rb_count = (self.rb_count or 0) + dtime
|
||||
if self.rb_count < .2 then
|
||||
return
|
||||
end
|
||||
self.rb_count = 0
|
||||
|
||||
local apos = self.object:get_pos() ; if not apos then return end
|
||||
local vec = self.object:get_velocity()
|
||||
|
@ -30,7 +30,13 @@ mobs:register_mob("dmobs:owl", {
|
||||
walk_end = 50
|
||||
},
|
||||
|
||||
do_custom = function(self)
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
self.tod_count = (self.tod_count or 0) + dtime
|
||||
if self.tod_count < 5 then
|
||||
return
|
||||
end
|
||||
self.tod_count = 0
|
||||
|
||||
local daytime = minetest.get_timeofday() * 24000
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user