Fixed ranks resetting if the player entity is removed. This should close #302 and close #346.

This commit is contained in:
Nayruden 2015-03-18 18:02:49 -06:00
parent 89643e283d
commit 42e74e367b

View File

@ -932,9 +932,10 @@ hook.Add( "PlayerAuthed", "UTEST", function() print( "HERE HERE: Player Authed"
local playerAuth = hook.GetTable().PlayerInitialSpawn.PlayerAuthSpawn
hook.Remove( "PlayerInitialSpawn", "PlayerAuthSpawn" ) -- Remove from original spot
local function newPlayerAuth( ... )
playerAuth( ... ) -- Put here, slightly ahead of ucl.
ucl.probe( ... )
local function newPlayerAuth( ply, ... )
ucl.authed[ ply:UniqueID() ] = nil -- If the player ent is removed before disconnecting, we can have this hanging out there.
playerAuth( ply, ... ) -- Put here, slightly ahead of ucl.
ucl.probe( ply, ... )
end
hook.Add( "PlayerAuthed", "ULibAuth", newPlayerAuth, HOOK_MONITOR_HIGH )