CBaseClientState::Clear
0x00101e20 · 355 bytes · __thiscall
_ZN16CBaseClientState5ClearEv
Decompiled
undefined (1 param)
/* CBaseClientState::Clear() */
void __thiscall CBaseClientState::Clear(CBaseClientState *this)
{
int *piVar1;
C_ServerClassInfo *pCVar2;
C_ServerClassInfo *this_00;
*(undefined4 *)(this + 0x6c) = 0xffffffff;
*(undefined4 *)(this + 0xc0) = 0xffffffff;
CClockDriftMgr::Clear((CClockDriftMgr *)(this + 0x74));
*(undefined4 *)(this + 0x70) = 0;
*(undefined4 *)(this + 0x41c8) = 0;
*(undefined4 *)(this + 0x41cc) = 0;
*(undefined4 *)(this + 0xcc) = 0;
*(undefined4 *)(this + 0xd0) = 0;
this[0xd4] = (CBaseClientState)0x0;
*(undefined4 *)(this + 0x14c) = 0;
if (this[0xfc] != (CBaseClientState)0x0) {
V_strncpy((char *)(this + 0x124),(char *)(this + 0xfc),0x28);
}
pCVar2 = *(C_ServerClassInfo **)(this + 0x41c4);
this[0xfc] = (CBaseClientState)0x0;
if (pCVar2 != (C_ServerClassInfo *)0x0) {
this_00 = pCVar2 + *(int *)(pCVar2 + -4) * 0x10;
if (pCVar2 != this_00) {
do {
this_00 = this_00 + -0x10;
C_ServerClassInfo::~C_ServerClassInfo(this_00);
pCVar2 = *(C_ServerClassInfo **)(this + 0x41c4);
} while (pCVar2 != this_00);
}
operator_delete__(pCVar2 + -4);
*(undefined4 *)(this + 0x41c4) = 0;
}
piVar1 = *(int **)(this + 0x49d4);
if (piVar1 != (int *)0x0) {
(**(code **)(*piVar1 + 0xc))(piVar1);
*(undefined4 *)(this + 0x49d4) = 0;
}
FreeEntityBaselines(this);
if (this[0x14] == (CBaseClientState)0x0) {
RecvTable_Term(false);
}
piVar1 = *(int **)(this + 0x10);
if (piVar1 != (int *)0x0) {
(**(code **)(*piVar1 + 0x90))(piVar1);
}
this[0xc4] = (CBaseClientState)0x0;
*(undefined4 *)(this + 200) = 0;
*(undefined4 *)(this + 0x18) = 0;
*(undefined8 *)(this + 0x1c) = 0;
this[0x49da] = (CBaseClientState)0x0;
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.