CEntitySaveRestoreBlockHandler::PreSave
0x004ac370 · 137 bytes · __thiscall
_ZN30CEntitySaveRestoreBlockHandler7PreSaveEP16CSaveRestoreData
Decompiled
undefined (2 params)
/* CEntitySaveRestoreBlockHandler::PreSave(CSaveRestoreData*) */
void __thiscall
CEntitySaveRestoreBlockHandler::PreSave
(CEntitySaveRestoreBlockHandler *this,CSaveRestoreData *param_1)
{
int *piVar1;
undefined4 uVar2;
CBaseEntity *pCVar3;
piVar1 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
/* try { // try from 004ac395 to 004ac3ee has its CatchHandler @ 004ac400 */
IGameSystem::OnSaveAllSystems();
uVar2 = (**(code **)(*physics + 0x20))(physics);
*(undefined4 *)(this + 8) = uVar2;
pCVar3 = (CBaseEntity *)0x0;
while( true ) {
pCVar3 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,pCVar3);
if (pCVar3 == (CBaseEntity *)0x0) break;
(**(code **)(*(int *)pCVar3 + 0xd0))(pCVar3,this + 4);
}
SaveInitEntities(this,param_1);
/* WARNING: Could not recover jumptable at 0x004ac3fe. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*piVar1 + 0x6c))();
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.