Fix some bugs with poison bar displaying

This commit is contained in:
Wuzzy 2017-06-06 18:33:01 +02:00
parent f1b99dc117
commit 9f683542af
2 changed files with 29 additions and 11 deletions

View file

@ -48,7 +48,8 @@ end
]]
-- Count number of poisonings a player has at once
mcl_hunger.poisonings = {}
mcl_hunger.poison_damage = {} -- damaging poison
mcl_hunger.poison_hunger = {} -- food poisoning, increasing hunger
-- Cooldown timers for each player, to force a short delay between consuming 2 food items
mcl_hunger.last_eat = {}
@ -139,7 +140,8 @@ end)
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
init_hud(player)
mcl_hunger.poisonings[name] = 0
mcl_hunger.poison_damage[name] = 0
mcl_hunger.poison_hunger[name] = 0
mcl_hunger.last_eat[name] = -1
end)