L L4D2node

CDebugHistory::Restore

0x0068c960 · 262 bytes · __thiscall

_ZN13CDebugHistory7RestoreER8IRestore

Decompiled

undefined (2 params)

/* CDebugHistory::Restore(IRestore&) */

void __thiscall CDebugHistory::Restore(CDebugHistory *this,IRestore *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  CDebugHistory *pCVar4;
  
  ClearHistories(this);
  iVar1 = (**(code **)(*(int *)param_1 + 0x3c))(param_1);
  if (iVar1 < 5) {
    pCVar4 = this + 0x440;
    if (5 < iVar1) {
      iVar1 = 5;
    }
    iVar3 = 0;
    if (0 < iVar1) {
      do {
        iVar2 = (**(code **)(*(int *)param_1 + 0x3c))(param_1);
        *(CDebugHistory **)(this + iVar3 * 4 + 0x138c40) = pCVar4 + iVar2;
        iVar3 = iVar3 + 1;
        (**(code **)(*(int *)param_1 + 0x48))(param_1,pCVar4,0x3e800,0);
        pCVar4 = pCVar4 + 0x3e800;
      } while (iVar3 != iVar1);
    }
  }
  else {
    iVar1 = (**(code **)(*(int *)param_1 + 0x3c))(param_1);
    if (5 < iVar1) {
      iVar1 = 5;
    }
    if (0 < iVar1) {
      iVar3 = 0;
      pCVar4 = this + 0x440;
      do {
        iVar2 = (**(code **)(*(int *)param_1 + 0x3c))(param_1);
        *(CDebugHistory **)(this + iVar3 * 4 + 0x138c40) = pCVar4 + iVar2;
        iVar3 = iVar3 + 1;
        (**(code **)(*(int *)param_1 + 0x48))(param_1,pCVar4,0x3e800,0);
        pCVar4 = pCVar4 + 0x3e800;
      } while (iVar3 != iVar1);
    }
  }
  CBaseEntity::Restore((CBaseEntity *)this,param_1);
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)