mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
Fix #885
This commit is contained in:
parent
fd5f3a8df7
commit
f2c978c892
1 changed files with 4 additions and 5 deletions
|
@ -1292,13 +1292,12 @@ local do_jump = function(self)
|
|||
if self.walk_chance == 0
|
||||
or minetest.registered_items[nod.name].walkable then
|
||||
|
||||
local v = self.object:get_velocity()
|
||||
|
||||
if v.y == 0
|
||||
and minetest.get_item_group(nod.name, "fence") == 0
|
||||
if minetest.get_item_group(nod.name, "fence") == 0
|
||||
and minetest.get_item_group(nod.name, "fence_gate") == 0
|
||||
and minetest.get_item_group(nod.name, "wall") == 0 then
|
||||
|
||||
local v = self.object:get_velocity()
|
||||
|
||||
v.y = self.jump_height
|
||||
|
||||
set_animation(self, "jump") -- only when defined
|
||||
|
@ -1312,7 +1311,7 @@ local do_jump = function(self)
|
|||
end
|
||||
self.object:set_acceleration({
|
||||
x = v.x * 2,
|
||||
y = 0,
|
||||
y = -10,
|
||||
z = v.z * 2,
|
||||
})
|
||||
end, self, v)
|
||||
|
|
Loading…
Reference in a new issue