Fixed admin classes not restored from cookies.
This commit is contained in:
parent
4bb9fa90a0
commit
1005cd73a4
|
@ -242,6 +242,17 @@ public OnClientPutInServer(client)
|
||||||
ZHPClientInit(client);
|
ZHPClientInit(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Client is authorized and fully in-game.
|
||||||
|
*
|
||||||
|
* @param client Client index.
|
||||||
|
*/
|
||||||
|
public OnClientPostAdminCheck(client)
|
||||||
|
{
|
||||||
|
// Forward authorized event to modules that depend on client admin info.
|
||||||
|
ClassOnClientAuthorized(client);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client is leaving the server.
|
* Client is leaving the server.
|
||||||
*
|
*
|
||||||
|
|
|
@ -67,14 +67,9 @@ ClassOnMapStart()
|
||||||
*/
|
*/
|
||||||
ClassClientInit(client)
|
ClassClientInit(client)
|
||||||
{
|
{
|
||||||
// Check if there are valid classes and the client is valid.
|
// Check if classes are loaded successfully and the client is valid.
|
||||||
// To prevent bots or SourceTV causing errors. If classes are invalid this
|
|
||||||
// event was executed before classes were loaded.
|
|
||||||
if (ClassValidated && ZRIsClientValid(client))
|
if (ClassValidated && ZRIsClientValid(client))
|
||||||
{
|
{
|
||||||
// Set default class indexes on the player.
|
|
||||||
ClassClientSetDefaultIndexes(client);
|
|
||||||
|
|
||||||
// Forward event to sub-modules.
|
// Forward event to sub-modules.
|
||||||
ClassOverlayClientInit(client);
|
ClassOverlayClientInit(client);
|
||||||
}
|
}
|
||||||
|
@ -83,6 +78,22 @@ ClassClientInit(client)
|
||||||
ClassPlayerSpawned[client] = false;
|
ClassPlayerSpawned[client] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event callback for authorized clients when they're connecting.
|
||||||
|
* (OnClientPostAdminCheck)
|
||||||
|
*
|
||||||
|
* @param client Client index.
|
||||||
|
*/
|
||||||
|
ClassOnClientAuthorized(client)
|
||||||
|
{
|
||||||
|
// Check if classes are loaded successfully and the client is valid.
|
||||||
|
if (ClassValidated && ZRIsClientValid(client))
|
||||||
|
{
|
||||||
|
// Set default class indexes on the player.
|
||||||
|
ClassClientSetDefaultIndexes(client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called a client disconnects.
|
* Called a client disconnects.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user