CHLTVServer::InitClientRecvTables
0x001700c0 · 264 bytes · __thiscall
_ZN11CHLTVServer20InitClientRecvTablesEv
Decompiled
undefined (1 param)
/* CHLTVServer::InitClientRecvTables() */
void __thiscall CHLTVServer::InitClientRecvTables(CHLTVServer *this)
{
CHLTVServer *pCVar1;
undefined4 uVar2;
int iVar3;
undefined4 *puVar4;
undefined4 uVar5;
undefined4 *puVar6;
uint uVar7;
iVar3 = ClientDLL_GetAllClasses();
if (iVar3 == 0) {
iVar3 = (**(code **)(*serverGameDLL + 0x28))(serverGameDLL);
pCVar1 = this + 0x5390;
for (; iVar3 != 0; iVar3 = *(int *)(iVar3 + 8)) {
AddRecvTableR(*(SendTable **)(iVar3 + 4),(RecvTable **)pCVar1,(int *)(this + 0x6390));
if (0x3ff < *(uint *)(this + 0x6390)) {
Error("AddRecvTableR: overflowed MAX_DATATABLES");
}
}
for (puVar4 = (undefined4 *)(**(code **)(*serverGameDLL + 0x28))(serverGameDLL);
puVar4 != (undefined4 *)0x0; puVar4 = (undefined4 *)puVar4[2]) {
uVar7 = *(uint *)(this + 0x6390);
if (0x3ff < uVar7) {
Error("ClientDLL_InitRecvTableMgr: overflowed MAX_DATATABLES");
uVar7 = *(uint *)(this + 0x6390);
}
uVar5 = FindRecvTable(*(char **)(puVar4[1] + 8),(RecvTable **)pCVar1,uVar7);
puVar6 = operator_new(0x18);
uVar2 = *puVar4;
*puVar6 = 0;
puVar6[1] = 0;
puVar6[3] = uVar5;
puVar6[2] = uVar2;
puVar6[4] = g_pClientClassHead;
g_pClientClassHead = puVar6;
}
RecvTable_Init((RecvTable **)pCVar1,*(int *)(this + 0x6390));
}
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.