Skip to content

Commit c60bafe

Browse files
A1mDevKevonLin
authored andcommitted
[OnClientPostAdminCheck] Replacing an unreliable forward. (SirPlease#920)
This forward does not always work correctly if the client does not complete authorization in time, it is unreliable for hooks, it is better to use 'OnClientPutInServer'.
1 parent 7703465 commit c60bafe

8 files changed

Lines changed: 11 additions & 11 deletions

File tree

addons/sourcemod/scripting/archive/double_getup.sp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ public void OnPluginStart()
125125
if (lateLoad) {
126126
for (int i = 1; i <= MaxClients; i++) {
127127
if (IsClientInGame(i)) {
128-
OnClientPostAdminCheck(i);
128+
OnClientPutInServer(i);
129129
}
130130
}
131131
}
132132
}
133133

134134
// Used to check for tank rocks and tank punches.
135-
public void OnClientPostAdminCheck(int client)
135+
public void OnClientPutInServer(int client)
136136
{
137137
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
138138
}

addons/sourcemod/scripting/archive/modules/FinaleSpawn.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public FS_ConVarChange(Handle:convar, const String:oldValue[], const String:newV
4141
FS_bEnabled = GetConVarBool(FS_hEnabled);
4242
}
4343

44-
public OnClientPostAdminCheck(client)
44+
public OnClientPutInServer(client)
4545
{
4646
SDKHook(client, SDKHook_PreThinkPost, HookCallback);
4747
}

addons/sourcemod/scripting/l4d2_ai_damagefix.sp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void OnPluginStart()
112112
if (bLateLoad) {
113113
for (int i = 1; i < MaxClients + 1; i++) {
114114
if (IsClientAndInGame(i)) {
115-
OnClientPostAdminCheck(i);
115+
OnClientPutInServer(i);
116116
}
117117
}
118118
}
@@ -129,7 +129,7 @@ void OnPounceInterruptChanged(ConVar convar, const char[] oldValue, const char[]
129129
iPounceInterrupt = StringToInt(newValue);
130130
}
131131

132-
public void OnClientPostAdminCheck(int client)
132+
public void OnClientPutInServer(int client)
133133
{
134134
// hook bots spawning
135135
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);

addons/sourcemod/scripting/l4d2_playstats.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ public void OnConfigsExecuted()
736736
}
737737

738738
// find a player
739-
public void OnClientPostAdminCheck(int client)
739+
public void OnClientPutInServer(int client)
740740
{
741741
GetPlayerIndexForClient(client);
742742
}

addons/sourcemod/scripting/l4d2_skill_detect.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ void CvarChange_PounceInterrupt(Handle convar, const char[] oldValue, const char
615615
g_iPounceInterrupt = GetConVarInt(convar);
616616
}
617617

618-
public void OnClientPostAdminCheck(int client)
618+
public void OnClientPutInServer(int client)
619619
{
620620
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamageByWitch);
621621
}

addons/sourcemod/scripting/l4d2_spitblock.sp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void OnPluginStart()
4949
if (g_bLateLoad) {
5050
for (int i = 1; i <= MaxClients; i++) {
5151
if (IsClientInGame(i)) {
52-
OnClientPostAdminCheck(i);
52+
OnClientPutInServer(i);
5353
}
5454
}
5555
}
@@ -125,7 +125,7 @@ public void OnMapStart()
125125
g_bIsBlockEnable = false;
126126
}
127127

128-
public void OnClientPostAdminCheck(int iClient)
128+
public void OnClientPutInServer(int iClient)
129129
{
130130
SDKHook(iClient, SDKHook_OnTakeDamage, stop_spit_dmg);
131131
}

addons/sourcemod/scripting/readyup.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public void OnMapEnd()
320320
}
321321
}
322322

323-
public void OnClientPostAdminCheck(int client)
323+
public void OnClientPutInServer(int client)
324324
{
325325
if (inReadyUp && L4D2_IsScavengeMode() && !IsFakeClient(client))
326326
{

addons/sourcemod/scripting/simple_witch_bonus.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public OnPluginStart()
6767
}
6868

6969
// player damage tracking
70-
public OnClientPostAdminCheck(client)
70+
public OnClientPutInServer(client)
7171
{
7272
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamageByWitch);
7373
}

0 commit comments

Comments
 (0)