From 41fcc346a280993a7aae95fa225b2afe33dfa68c Mon Sep 17 00:00:00 2001 From: BlockMen Date: Tue, 8 Jul 2014 18:21:33 +0200 Subject: [PATCH] Improve jump, decrease herd radius --- init.lua | 2 +- sheep.lua | 4 ++-- zombie.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 9f8a57d..766eb70 100644 --- a/init.lua +++ b/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 diff --git a/sheep.lua b/sheep.lua index 5bfab6f..7973e7f 100644 --- a/sheep.lua +++ b/sheep.lua @@ -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 diff --git a/zombie.lua b/zombie.lua index 7c8ba71..34eeef8 100644 --- a/zombie.lua +++ b/zombie.lua @@ -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