CBaseGameStats_Driver::LevelInitPreEntity
0x00462fa0 · 399 bytes · __thiscall
_ZN21CBaseGameStats_Driver18LevelInitPreEntityEv
Decompiled
undefined (1 param)
/* CBaseGameStats_Driver::LevelInitPreEntity() */
void __thiscall CBaseGameStats_Driver::LevelInitPreEntity(CBaseGameStats_Driver *this)
{
undefined *puVar1;
undefined4 *puVar2;
char cVar3;
int iVar4;
int iVar5;
ulong local_18;
int local_14;
int local_10;
this[0x130f] = (CBaseGameStats_Driver)0x1;
this[0x1310] = (CBaseGameStats_Driver)0x0;
iVar4 = _V_stricmp(&s_szPseudoUniqueID,"unknown");
if (iVar4 == 0) {
iVar4 = (**(code **)(*cvar + 0x30))(cvar,"hostip");
iVar5 = (**(code **)(*cvar + 0x30))(cvar,"hostport");
if ((iVar5 != 0) && (iVar4 != 0)) {
local_14 = *(int *)(*(int *)(iVar4 + 0x1c) + 0x30);
local_10 = *(int *)(*(int *)(iVar5 + 0x1c) + 0x30);
if ((local_14 != 0) && (local_10 != 0)) {
CRC32_Init(&local_18);
CRC32_ProcessBuffer(&local_18,&local_14,8);
CRC32_Final(&local_18);
V_snprintf(&s_szPseudoUniqueID,0x14,"H:%x",local_18);
}
}
}
PossibleMapChange(this);
puVar2 = gpGlobals;
*(undefined4 *)(this + 0x1380) = 0;
puVar1 = gamestats;
*(undefined4 *)(this + 0x1318) = *puVar2;
(**(code **)(*(int *)puVar1 + 0x1c))(puVar1);
cVar3 = (*(code *)**(undefined4 **)gamestats)(gamestats);
if (cVar3 != '\0') {
cVar3 = (**(code **)(*(int *)gamestats + 0xb8))(gamestats);
if (cVar3 != '\0') {
(**(code **)(*(int *)gamestats + 0xa4))(gamestats,0);
}
cVar3 = (**(code **)(*(int *)gamestats + 0xcc))(gamestats);
if (cVar3 != '\0') {
(**(code **)(*(int *)gamestats + 0xa8))(gamestats);
return;
}
}
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.