mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-28 06:53:03 +00:00
Cause more exhaustion when sprint-jumping
This commit is contained in:
parent
705dae46a0
commit
55eba5c54b
2 changed files with 6 additions and 2 deletions
|
@ -14,7 +14,7 @@ mcl_hunger.HUD_TICK = 0.1
|
||||||
-- Exhaustion increase
|
-- Exhaustion increase
|
||||||
mcl_hunger.EXHAUST_DIG = 5 -- after digging node
|
mcl_hunger.EXHAUST_DIG = 5 -- after digging node
|
||||||
mcl_hunger.EXHAUST_JUMP = 50 -- jump
|
mcl_hunger.EXHAUST_JUMP = 50 -- jump
|
||||||
mcl_hunger.EXHAUST_SPRINT_JUMP = 200 -- TODO: jump while sprinting
|
mcl_hunger.EXHAUST_SPRINT_JUMP = 200 -- jump while sprinting
|
||||||
mcl_hunger.EXHAUST_ATTACK = 100 -- hit an enemy
|
mcl_hunger.EXHAUST_ATTACK = 100 -- hit an enemy
|
||||||
mcl_hunger.EXHAUST_SWIM = 10 -- player movement in water
|
mcl_hunger.EXHAUST_SWIM = 10 -- player movement in water
|
||||||
mcl_hunger.EXHAUST_SPRINT = 100 -- sprint (per node)
|
mcl_hunger.EXHAUST_SPRINT = 100 -- sprint (per node)
|
||||||
|
|
|
@ -49,7 +49,11 @@ minetest.register_globalstep(function(dtime)
|
||||||
and minetest.get_item_group(node_stand, "disable_jump") == 0
|
and minetest.get_item_group(node_stand, "disable_jump") == 0
|
||||||
and minetest.get_item_group(node_stand_below, "disable_jump") == 0 then
|
and minetest.get_item_group(node_stand_below, "disable_jump") == 0 then
|
||||||
-- Cause exhaustion for jumping
|
-- Cause exhaustion for jumping
|
||||||
|
if mcl_sprint.is_sprinting(name) then
|
||||||
|
mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_SPRINT_JUMP)
|
||||||
|
else
|
||||||
mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_JUMP)
|
mcl_hunger.exhaust(name, mcl_hunger.EXHAUST_JUMP)
|
||||||
|
end
|
||||||
|
|
||||||
-- Reset cooldown timer
|
-- Reset cooldown timer
|
||||||
mcl_playerplus_internal[name].jump_cooldown = 0.45
|
mcl_playerplus_internal[name].jump_cooldown = 0.45
|
||||||
|
|
Loading…
Reference in a new issue