Improve jump, decrease herd radius
This commit is contained in:
parent
23cf978420
commit
41fcc346a2
2
init.lua
2
init.lua
@ -161,7 +161,7 @@ function creatures.jump(self, pos, jump_y, timer)
|
||||
def2 = minetest.registered_items[n2.name]
|
||||
end
|
||||
if def and def.walkable and def2 and not def2.walkable and not def.groups.fences and n.name ~= "default:fence_wood" then--
|
||||
self.object:setvelocity({x=self.object:getvelocity().x,y=jump_y,z=self.object:getvelocity().z})
|
||||
self.object:setvelocity({x=self.object:getvelocity().x*2.2,y=jump_y,z=self.object:getvelocity().z*2.2})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -214,7 +214,7 @@ SHEEP_DEF.on_step = function(self, dtime)
|
||||
|
||||
-- die if old and alone
|
||||
if self.lifetime > s_life_max then
|
||||
if creatures.find_mates(current_pos, "sheep", 18) then
|
||||
if creatures.find_mates(current_pos, "sheep", 12) then
|
||||
self.lifetime = 0
|
||||
else
|
||||
self.object:set_hp(0)
|
||||
@ -362,7 +362,7 @@ SHEEP_DEF.on_step = function(self, dtime)
|
||||
self.npc_anim = anim
|
||||
end
|
||||
--jump
|
||||
creatures.jump(self, current_pos, 6.85, 0.2)
|
||||
creatures.jump(self, current_pos, 7.7, 0.2)
|
||||
end
|
||||
|
||||
-- EATING
|
||||
|
@ -327,7 +327,7 @@ ZOMBIE_DEF.on_step = function(self, dtime)
|
||||
--jump
|
||||
local p = current_pos
|
||||
p.y = p.y-0.5
|
||||
creatures.jump(self, p, 7, 0.25)
|
||||
creatures.jump(self, p, 7.3, 0.25)
|
||||
|
||||
if self.attacker ~= "" and minetest.setting_getbool("enable_damage") then
|
||||
local s = current_pos
|
||||
|
Loading…
x
Reference in New Issue
Block a user