Tweak and optimize medkits

This commit is contained in:
Anand S 2019-03-06 12:31:35 +05:30 committed by rubenwardy
parent 82c2477d70
commit 92c5600d7e
3 changed files with 19 additions and 15 deletions

View file

@ -47,7 +47,7 @@ minetest.register_globalstep(function(dtime)
-- ##1## replace info.sprintRequested with info.sprinting
if sprintRequested ~= info.sprintRequested then
if sprintRequested and info.stamina > MIN_SPRINT
and not is_healing(player:get_player_name()) then
and not medkits.is_healing(player:get_player_name()) then
setSprinting(player, info, true)
elseif not sprintRequested then
setSprinting(player, info, false)