1
0
Fork 0

Fix poison not reset after respawn

This commit is contained in:
Wuzzy 2017-05-23 02:20:10 +02:00
parent be79ade294
commit 90a28d3ec5
1 changed files with 3 additions and 1 deletions

View File

@ -182,8 +182,10 @@ minetest.register_on_joinplayer(function(player)
end) end)
minetest.register_on_respawnplayer(function(player) minetest.register_on_respawnplayer(function(player)
-- reset hunger (and save) -- reset hunger, related values and poison
local name = player:get_player_name() local name = player:get_player_name()
mcl_hunger.stop_poison(player)
mcl_hunger.last_eat[name] = -1 mcl_hunger.last_eat[name] = -1
local h, s, e = 20, mcl_hunger.SATURATION_INIT, 0 local h, s, e = 20, mcl_hunger.SATURATION_INIT, 0