CEntitySaveRestoreBlockHandler::ReadRestoreHeaders
0x004a6230 · 345 bytes · __thiscall
_ZN30CEntitySaveRestoreBlockHandler18ReadRestoreHeadersEP8IRestore
Decompiled
undefined (2 params)
/* CEntitySaveRestoreBlockHandler::ReadRestoreHeaders(IRestore*) */
void __thiscall
CEntitySaveRestoreBlockHandler::ReadRestoreHeaders
(CEntitySaveRestoreBlockHandler *this,IRestore *param_1)
{
int iVar1;
int iVar2;
int iVar3;
undefined4 *puVar4;
int iVar5;
int local_20 [4];
iVar1 = (**(code **)(*(int *)param_1 + 0x9c))(param_1);
(**(code **)(*(int *)param_1 + 0x38))(param_1,local_20,1,0);
iVar2 = (**(code **)(*engine + 0x68))(engine,local_20[0] * 0x38,1);
if (iVar2 != 0) {
*(int *)(iVar1 + 0x560) = iVar2;
iVar3 = 0;
*(int *)(iVar1 + 0x55c) = local_20[0];
iVar5 = 0;
if (0 < local_20[0]) {
while( true ) {
puVar4 = (undefined4 *)(iVar2 + iVar5);
iVar3 = iVar3 + 1;
iVar5 = iVar5 + 0x38;
*puVar4 = 0xffffffff;
puVar4[1] = 0xffffffff;
puVar4[2] = 0xffffffff;
puVar4[3] = 0xffffffff;
puVar4[5] = 0;
puVar4[6] = 0;
puVar4[7] = 0;
puVar4[8] = 0;
puVar4[9] = 0;
puVar4[10] = 0;
puVar4[0xb] = 0;
puVar4[0xc] = 0;
puVar4[0xd] = 0;
if (*(int *)(iVar1 + 0x55c) <= iVar3) break;
iVar2 = *(int *)(iVar1 + 0x560);
}
if (0 < *(int *)(iVar1 + 0x55c)) {
iVar2 = 0;
iVar3 = 0;
do {
iVar3 = iVar3 + 1;
(**(code **)(*(int *)param_1 + 0xc))
(param_1,"ETABLE",iVar2 + *(int *)(iVar1 + 0x560),0,entitytable_t::m_DataMap,
DAT_00f18ee4);
iVar2 = iVar2 + 0x38;
} while (iVar3 < *(int *)(iVar1 + 0x55c));
}
}
}
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.