CTerrorGameRules::ClientDisconnected
0x0050c970 · 221 bytes · __thiscall
_ZN16CTerrorGameRules18ClientDisconnectedEP7edict_t
Decompiled
undefined (2 params)
/* CTerrorGameRules::ClientDisconnected(edict_t*) */
void __thiscall CTerrorGameRules::ClientDisconnected(CTerrorGameRules *this,edict_t *param_1)
{
int *piVar1;
char cVar2;
edict_t *peVar3;
CTerrorPlayer *pCVar4;
code *pcVar5;
CTerrorPlayer *pCVar6;
peVar3 = param_1;
if (((param_1 == (edict_t *)0x0) &&
((peVar3 = *(edict_t **)(gpGlobals + 0x58), peVar3 == (edict_t *)0x0 ||
(((byte)*peVar3 & 2) != 0)))) || (piVar1 = *(int **)(peVar3 + 0xc), piVar1 == (int *)0x0)) {
pcVar5 = *(code **)(*TheDirector + 0x38);
}
else {
pCVar4 = (CTerrorPlayer *)(**(code **)(*piVar1 + 0x18))(piVar1);
pcVar5 = *(code **)(*TheDirector + 0x38);
if (pCVar4 != (CTerrorPlayer *)0x0) {
cVar2 = (**(code **)(*(int *)pCVar4 + 0x16c))(pCVar4);
pCVar6 = pCVar4;
if (cVar2 == '\0') {
pCVar6 = (CTerrorPlayer *)0x0;
}
(*pcVar5)(TheDirector,pCVar6);
CCSGameRules::ClientDisconnected((CCSGameRules *)this,param_1);
cVar2 = (**(code **)(*(int *)pCVar4 + 0x16c))(pCVar4);
if (cVar2 == '\0') {
pCVar4 = (CTerrorPlayer *)0x0;
}
goto LAB_0050c9f0;
}
}
pCVar4 = (CTerrorPlayer *)0x0;
(*pcVar5)(TheDirector,0);
CCSGameRules::ClientDisconnected((CCSGameRules *)this,param_1);
LAB_0050c9f0:
PlayerReporter::OnPlayerDisconnected(ThePlayerReporter,pCVar4);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.