Skip to content

Commit

Permalink
bugfix fake player
Browse files Browse the repository at this point in the history
make sure toggles are read when a player logs on
  • Loading branch information
SwissalpS committed Dec 10, 2021
1 parent 4e38397 commit 1704cdb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion huds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ postool.getPlayerTables = function(oPlayer, bRef)
-- happens when player is not online but has postool in a machine
postool.initHud(oPlayer)
tDB = postool.tHudDB[sName]
tDB.bIsFake = true
end

if bRef then return tDB end
Expand Down Expand Up @@ -381,7 +382,10 @@ postool.initHud = function(oPlayer)
local sName = oPlayer:get_player_name()

-- already set up?
if postool.tHudDB[sName] then return end
if postool.tHudDB[sName] then
if not postool.tHudDB[sName].bIsFake then return end
postool.tHudDB[sName] = nil
end

local tb, bMain, nX = postool.readPlayerToggles(oPlayer)

Expand Down

0 comments on commit 1704cdb

Please sign in to comment.