Fix broken hunger mod when damage disabled

This commit is contained in:
Wuzzy 2017-05-22 08:20:58 +02:00
parent 0d1f499446
commit 83d25276a9
2 changed files with 22 additions and 17 deletions

View file

@ -82,7 +82,7 @@ minetest.register_globalstep(function(dtime)
if players[playerName]["shouldSprint"] == true then --Stopped
local sprinting
-- Prevent sprinting if standing on soul sand or hungry
if playerplus[playerName].nod_stand == "mcl_nether:soul_sand" or (mcl_hunger and mcl_hunger.get_hunger(player) <= 6) then
if playerplus[playerName].nod_stand == "mcl_nether:soul_sand" or (mcl_hunger.active and mcl_hunger.get_hunger(player) <= 6) then
sprinting = false
else
sprinting = true