From a6b5087014e5953ae8e764f8c9216ec1170260df Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Thu, 15 Feb 2018 21:52:52 +0000 Subject: [PATCH] fix a bug with hudinfo and a player joining during update_huds() --- mods/hudinfo/init.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mods/hudinfo/init.lua b/mods/hudinfo/init.lua index 6c4c2ce..2ec6b9f 100644 --- a/mods/hudinfo/init.lua +++ b/mods/hudinfo/init.lua @@ -200,11 +200,8 @@ local function update_huds() local locale, temparature, humid, weather_str = hudinfo.player_env_data(player) - if hudinfo.player_data[name].temp == nil then + if hudinfo.player_data[name] == nil then --fail - elseif hudinfo.player_data[name].humid == nil then -- fail prevention - elseif hudinfo.player_data[name].locale == nil then - elseif hudinfo.player_data[name].weather_str == nil then else player:hud_change(hudinfo.player_data[name].temp, "text", tonumber(string.format("%.1f", temparature)) .. " C,")