Fix error with latest Minetest-dev version by fixing the logical order (#34)

`stamina.set_saturation()` uses the hud id set for the player. Thus, the id should be set before calling this function.
Until now, it only worked because of undocumented behaviour. See minetest/minetest#10568
This commit is contained in:
Thomas--S 2020-10-31 13:06:45 +01:00 committed by GitHub
parent e4e456a3c9
commit b4519d13db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -520,8 +520,8 @@ minetest.register_on_joinplayer(function(player)
offset = {x = -266, y = -110},
max = 0,
})
stamina.set_saturation(player, level)
set_hud_id(player, id)
stamina.set_saturation(player, level)
-- reset poisoned
stamina.set_poisoned(player, false)
-- remove legacy hud_id from player metadata