L L4D2node

CBaseEntityOutput::Restore

0x0063be70 · 251 bytes · __thiscall

_ZN17CBaseEntityOutput7RestoreER8IRestorei

Decompiled

undefined (3 params)

/* CBaseEntityOutput::Restore(IRestore&, int) */

undefined4 __thiscall
CBaseEntityOutput::Restore(CBaseEntityOutput *this,IRestore *param_1,int param_2)

{
  int iVar1;
  CEventAction *this_00;
  CEventAction *pCVar2;
  int local_20;
  
  iVar1 = (**(code **)(*(int *)param_1 + 0xc))(param_1,"Value",this,0,m_DataMap,DAT_00f2a8a0);
  if (iVar1 == 0) {
    return 0;
  }
  local_20 = 0;
  *(undefined4 *)(this + 0x14) = 0;
  pCVar2 = (CEventAction *)0x0;
  if (0 < param_2) {
    do {
      this_00 = (CEventAction *)CUtlMemoryPool::Alloc((CUtlMemoryPool *)g_EntityListPool,0x1c);
                    /* try { // try from 0063bf19 to 0063bf1d has its CatchHandler @ 0063bf7d */
      CEventAction::CEventAction(this_00,(char *)0x0);
      iVar1 = (**(code **)(*(int *)param_1 + 0xc))
                        (param_1,"EntityOutput",this_00,0,CEventAction::m_DataMap,DAT_00f2a8b8);
      if (iVar1 == 0) {
        return 0;
      }
      if (pCVar2 == (CEventAction *)0x0) {
        *(CEventAction **)(this + 0x14) = this_00;
      }
      else {
        *(CEventAction **)(pCVar2 + 0x18) = this_00;
      }
      local_20 = local_20 + 1;
      *(undefined4 *)(this_00 + 0x18) = 0;
      pCVar2 = this_00;
    } while (local_20 != param_2);
  }
  return 1;
}

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)