fix a bug with hudinfo and a player joining during update_huds()

This commit is contained in:
Jordan Snelling 2018-02-15 21:52:52 +00:00
parent b8b9d3cc2b
commit a6b5087014

View File

@ -200,11 +200,8 @@ local function update_huds()
local locale, temparature, humid, weather_str = hudinfo.player_env_data(player) 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 --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 else
player:hud_change(hudinfo.player_data[name].temp, "text", tonumber(string.format("%.1f", temparature)) .. " C,") player:hud_change(hudinfo.player_data[name].temp, "text", tonumber(string.format("%.1f", temparature)) .. " C,")