From 1b24c014dcd1b8f47da0f6b42dffc32bbe14962a Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Sun, 23 Jul 2023 22:09:44 -0400 Subject: [PATCH] check player valid when respawn, cos update healt cannot check * update_health canot made a check player cos its called already in other places where such check is made, but at respawn moment the player object is not checked so we must made it manually and not a double check in update_healt due performancde issues --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 0c4f836..5fff6b9 100644 --- a/init.lua +++ b/init.lua @@ -594,7 +594,9 @@ minetest.register_on_player_hpchange(function(player) end) minetest.register_on_respawnplayer(function(player) + if player_exists(player) then update_health(player) + end hb.hide_hudbar(player, "breath") end)