Skip to content

Commit

Permalink
dwarfs jump one block
Browse files Browse the repository at this point in the history
  • Loading branch information
jojoa1997 committed Mar 16, 2013
1 parent 26b4a65 commit 83877ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions npc/npc_dwarf.lua
Expand Up @@ -240,7 +240,7 @@ end
if self.direction ~= nil then
if self.jump_timer > 0.3 then
if minetest.env:get_node({x=self.object:getpos().x + self.direction.x,y=self.object:getpos().y-1,z=self.object:getpos().z + self.direction.z}).name ~= "air" then
self.object:setvelocity({x=self.object:getvelocity().x,y=5,z=self.object:getvelocity().z})
self.object:setvelocity({x=self.object:getvelocity().x,y=2.5,z=self.object:getvelocity().z})
self.jump_timer = 0
end
end
Expand Down Expand Up @@ -339,4 +339,4 @@ end
end
end

minetest.register_entity("peaceful_npc:npc_dwarf", NPC_ENTITY_DWARF)
minetest.register_entity("peaceful_npc:npc_dwarf", NPC_ENTITY_DWARF)

0 comments on commit 83877ea

Please sign in to comment.