mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-11 04:03:15 +01:00
fix getting wrong node
This commit is contained in:
parent
509fadfebb
commit
02c92dc6f8
@ -285,7 +285,7 @@ minetest.register_globalstep(function(dtime)
|
|||||||
elytra.speed = clamp(get_overall_velocity(player:get_velocity()) - 1, 0, 2)
|
elytra.speed = clamp(get_overall_velocity(player:get_velocity()) - 1, 0, 2)
|
||||||
end
|
end
|
||||||
-- don't let player get too fast by spamming jump
|
-- don't let player get too fast by spamming jump
|
||||||
local block_below = minetest.get_node(vector.offset(player:get_velocity(), 0, -0.7, 0)).name
|
local block_below = minetest.get_node(vector.offset(player:get_pos(), 0, -0.7, 0)).name
|
||||||
if minetest.registered_nodes[block_below].walkable then
|
if minetest.registered_nodes[block_below].walkable then
|
||||||
elytra.speed = clamp(elytra.speed, -1, 5)
|
elytra.speed = clamp(elytra.speed, -1, 5)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user