ServerClass::ServerClass
0x00450bc0 · 169 bytes · __thiscall
_ZN11ServerClassC2EPcP9SendTable
Decompiled
undefined (3 params)
/* ServerClass::ServerClass(char*, SendTable*) */
void __thiscall ServerClass::ServerClass(ServerClass *this,char *param_1,SendTable *param_2)
{
int iVar1;
undefined4 *puVar2;
undefined4 *puVar3;
undefined4 *puVar4;
*(undefined4 *)(this + 0x10) = 0xffff;
*(char **)this = param_1;
puVar4 = (undefined4 *)g_pServerClassHead;
*(SendTable **)(this + 4) = param_2;
if (puVar4 == (undefined4 *)0x0) {
*(undefined4 *)(this + 8) = 0;
g_pServerClassHead = this;
return;
}
puVar3 = (undefined4 *)puVar4[2];
iVar1 = _V_stricmp((char *)*puVar4,param_1);
puVar2 = (undefined4 *)g_pServerClassHead;
if (0 < iVar1) {
g_pServerClassHead = this;
*(undefined4 **)(this + 8) = puVar2;
return;
}
if (puVar3 != (undefined4 *)0x0) {
do {
puVar2 = puVar3;
iVar1 = _V_stricmp((char *)*puVar2,param_1);
puVar3 = puVar2;
if (0 < iVar1) goto LAB_00450c55;
puVar3 = (undefined4 *)puVar2[2];
puVar4 = puVar2;
} while ((undefined4 *)puVar2[2] != (undefined4 *)0x0);
puVar3 = (undefined4 *)0x0;
}
LAB_00450c55:
*(undefined4 **)(this + 8) = puVar3;
puVar4[2] = this;
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.