forked from TeamUlysses/ulib
Naming changes
This commit is contained in:
parent
f73bb88c6c
commit
eb8ce08e93
@ -41,7 +41,7 @@ local function onEntCreated( ent )
|
||||
needs_auth[ ent:UserID() ] = nil
|
||||
end
|
||||
end
|
||||
hook.Add( "OnEntityCreated", "ULibPlayerAuthCheck", onEntCreated, MONITOR_HIGH ) -- Listen for player creations
|
||||
hook.Add( "OnEntityCreated", "ULibPlayerAuthCheck", onEntCreated, HOOK_MONITOR_HIGH ) -- Listen for player creations
|
||||
|
||||
local function onInitPostEntity()
|
||||
if LocalPlayer():IsValid() then
|
||||
@ -49,7 +49,7 @@ local function onInitPostEntity()
|
||||
RunConsoleCommand( "ulib_cl_ready" )
|
||||
end
|
||||
end
|
||||
hook.Add( "InitPostEntity", "ULibLocalPlayerReady", onInitPostEntity, MONITOR_HIGH ) -- Flag server when LocalPlayer() should be valid
|
||||
hook.Add( "InitPostEntity", "ULibLocalPlayerReady", onInitPostEntity, HOOK_MONITOR_HIGH ) -- Flag server when LocalPlayer() should be valid
|
||||
|
||||
-- We're trying to make sure that the player auths after the player object is created, this function is part of that check
|
||||
function authPlayerIfReady( ply, userid )
|
||||
|
@ -157,7 +157,7 @@ local function damageCheck( ent )
|
||||
-- return false
|
||||
end
|
||||
end
|
||||
hook.Add( "EntityTakeDamage", "ULibEntDamagedCheck", damageCheck, MONITOR_HIGH )
|
||||
hook.Add( "EntityTakeDamage", "ULibEntDamagedCheck", damageCheck, HOOK_MONITOR_HIGH )
|
||||
|
||||
-- This is just in case we have some horribly programmed addon that goes rampant in deleting things
|
||||
local function removedCheck( ent )
|
||||
@ -189,4 +189,4 @@ local function removedCheck( ent )
|
||||
end )
|
||||
end
|
||||
end
|
||||
hook.Add( "EntityRemoved", "ULibEntRemovedCheck", removedCheck, MONITOR_HIGH )
|
||||
hook.Add( "EntityRemoved", "ULibEntRemovedCheck", removedCheck, HOOK_MONITOR_HIGH )
|
||||
|
@ -889,19 +889,19 @@ local function botCheck( ply )
|
||||
ucl.probe( ply )
|
||||
end
|
||||
end
|
||||
hook.Add( "PlayerInitialSpawn", "ULibSendAuthToClients", botCheck, MONITOR_HIGH )
|
||||
hook.Add( "PlayerInitialSpawn", "ULibSendAuthToClients", botCheck, HOOK_MONITOR_HIGH )
|
||||
|
||||
local function sendAuthToClients( ply )
|
||||
ULib.clientRPC( _, "authPlayerIfReady", ply, ply:UserID() ) -- Call on client
|
||||
end
|
||||
hook.Add( ULib.HOOK_UCLAUTH, "ULibSendAuthToClients", sendAuthToClients, MONITOR_LOW )
|
||||
hook.Add( ULib.HOOK_UCLAUTH, "ULibSendAuthToClients", sendAuthToClients, HOOK_MONITOR_LOW )
|
||||
|
||||
local function sendUCLDataToClient( ply )
|
||||
ULib.clientRPC( ply, "ULib.ucl.initClientUCL", ucl.authed, ucl.groups ) -- Send all UCL data (minus offline users) to all loaded users
|
||||
ULib.clientRPC( ply, "hook.Call", ULib.HOOK_UCLCHANGED ) -- Call hook on client
|
||||
ULib.clientRPC( ply, "authPlayerIfReady", ply, ply:UserID() ) -- Call on client
|
||||
end
|
||||
hook.Add( ULib.HOOK_LOCALPLAYERREADY, "ULibSendUCLDataToClient", sendUCLDataToClient, MONITOR_HIGH )
|
||||
hook.Add( ULib.HOOK_LOCALPLAYERREADY, "ULibSendUCLDataToClient", sendUCLDataToClient, HOOK_MONITOR_HIGH )
|
||||
|
||||
local function playerDisconnected( ply )
|
||||
-- We want to perform these actions after everything else has processed through, but we need high priority hook to ensure we don't get sniped.
|
||||
@ -911,7 +911,7 @@ local function playerDisconnected( ply )
|
||||
hook.Call( ULib.HOOK_UCLCHANGED )
|
||||
end )
|
||||
end
|
||||
hook.Add( "PlayerDisconnected", "ULibUCLDisconnect", playerDisconnected, MONITOR_HIGH )
|
||||
hook.Add( "PlayerDisconnected", "ULibUCLDisconnect", playerDisconnected, HOOK_MONITOR_HIGH )
|
||||
|
||||
local function UCLChanged()
|
||||
ULib.clientRPC( _, "ULib.ucl.initClientUCL", ucl.authed, ucl.groups ) -- Send all UCL data (minus offline users) to all loaded users
|
||||
@ -936,7 +936,7 @@ local function newPlayerAuth( ... )
|
||||
playerAuth( ... ) -- Put here, slightly ahead of ucl.
|
||||
ucl.probe( ... )
|
||||
end
|
||||
hook.Add( "PlayerAuthed", "ULibAuth", newPlayerAuth, MONITOR_HIGH )
|
||||
hook.Add( "PlayerAuthed", "ULibAuth", newPlayerAuth, HOOK_MONITOR_HIGH )
|
||||
|
||||
local meta = FindMetaTable( "Player" )
|
||||
if not meta then return end
|
||||
|
@ -15,11 +15,11 @@ local tostring = tostring
|
||||
local assert = assert
|
||||
local table = table--]]
|
||||
|
||||
MONITOR_HIGH = -2
|
||||
HOOK_MONITOR_HIGH = -2
|
||||
HOOK_HIGH = -1
|
||||
HOOK_NORMAL = 0
|
||||
HOOK_LOW = 1
|
||||
MONITOR_LOW = 2
|
||||
HOOK_MONITOR_LOW = 2
|
||||
|
||||
-- Grab all previous hooks from the pre-existing hook module.
|
||||
local OldHooks = hook.GetTable()
|
||||
|
@ -423,7 +423,7 @@ function ULib.namedQueueFunctionCall( queueName, fn, ... )
|
||||
|
||||
stacks[ queueName ] = stacks[ queueName ] or {}
|
||||
table.insert( stacks[ queueName ], { fn=fn, n=select( "#", ... ), ... } )
|
||||
hook.Add( "Think", "ULibQueueThink", onThink, MONITOR_HIGH )
|
||||
hook.Add( "Think", "ULibQueueThink", onThink, HOOK_MONITOR_HIGH )
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user