CBaseCombatCharacter::Restore
0x005f8b70 · 275 bytes · __thiscall
_ZN20CBaseCombatCharacter7RestoreER8IRestore
Decompiled
undefined (2 params)
/* CBaseCombatCharacter::Restore(IRestore&) */
int __thiscall CBaseCombatCharacter::Restore(CBaseCombatCharacter *this,IRestore *param_1)
{
uint uVar1;
int iVar2;
undefined1 *puVar3;
undefined *puVar4;
undefined1 *puVar5;
int iVar6;
int iVar7;
iVar2 = CBaseAnimating::Restore((CBaseAnimating *)this,param_1);
iVar7 = 0;
if ((iVar2 != 0) && (iVar7 = iVar2, *(int *)(gpGlobals + 0x48) == 2)) {
puVar5 = *(undefined1 **)(this + 0x7c);
if (puVar5 == (undefined1 *)0x0) {
puVar5 = &DAT_00d539c2;
}
puVar3 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x154) != (undefined1 *)0x0) {
puVar3 = *(undefined1 **)(this + 0x154);
}
DevMsg(2,"%s (%s) removing class relationships due to level transition\n",puVar3,puVar5);
iVar6 = *(int *)(this + 0x1854) + -1;
if (-1 < iVar6) {
iVar7 = iVar6 * 0x10;
do {
while( true ) {
uVar1 = *(uint *)(*(int *)(this + 0x1848) + iVar7);
if ((((uVar1 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)) break;
iVar6 = iVar6 + -1;
iVar7 = iVar7 + -0x10;
if (iVar6 == -1) {
return iVar2;
}
}
if (((uint *)(*(int *)(this + 0x1848) + iVar7))[1] != 0) {
CUtlVector<Relationship_t,CUtlMemory<Relationship_t,int>>::FastRemove
((CUtlVector<Relationship_t,CUtlMemory<Relationship_t,int>> *)(this + 0x1848),
iVar6);
}
iVar6 = iVar6 + -1;
iVar7 = iVar7 + -0x10;
} while (iVar6 != -1);
return iVar2;
}
}
return iVar7;
}
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.