CHLTVClient::CHLTVClient
0x00168c20 · 264 bytes · __thiscall
_ZN11CHLTVClientC1EiP11CBaseServer
Decompiled
undefined (3 params)
/* CHLTVClient::CHLTVClient(int, CBaseServer*) */
void __thiscall CHLTVClient::CHLTVClient(CHLTVClient *this,int param_1,CBaseServer *param_2)
{
undefined4 uVar1;
int *piVar2;
int iVar3;
CBaseClient::CBaseClient((CBaseClient *)this);
*(undefined ***)this = &PTR__CHLTVClient_002b0c08;
*(undefined ***)(this + 4) = &PTR__CHLTVClient_002b0d58;
*(undefined ***)(this + 8) = &PTR__CHLTVClient_002b0e18;
/* try { // try from 00168c51 to 00168d1d has its CatchHandler @ 00168d37 */
CBaseClient::Clear((CBaseClient *)this);
*(int *)(this + 0x30) = param_1;
*(CBaseServer **)(this + 0xb8) = param_2;
if (param_2 == (CBaseServer *)0x0) {
piVar2 = (int *)0x0;
}
else {
piVar2 = (int *)__dynamic_cast(param_2,&CBaseServer::typeinfo,&CHLTVServer::typeinfo,4);
}
*(int **)(this + 0x1d79c) = piVar2;
iVar3 = (**(code **)(*piVar2 + 0x44))(piVar2);
*(undefined4 *)(this + 0x1d704) = 0;
*(int *)(this + 0x34) = iVar3 + 1;
uVar1 = tv_chatgroupsize._28_4_;
*(undefined8 *)(this + 0x1d708) = 0;
*(undefined8 *)(this + 0x1d750) = 0;
this[0x1d758] = (CHLTVClient)0x0;
if (0 < *(int *)(uVar1 + 0x30)) {
V_snprintf((char *)(this + 0x1d759),0x40,"group%d",param_1 % *(int *)(uVar1 + 0x30));
return;
}
V_strncpy((char *)(this + 0x1d759),"all",0x40);
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.