L L4D2node

CPhysSaveRestoreBlockHandler::Save

0x00481ed0 · 263 bytes · __thiscall

_ZN28CPhysSaveRestoreBlockHandler4SaveEP5ISave

Decompiled

undefined (2 params)

/* CPhysSaveRestoreBlockHandler::Save(ISave*) */

void __thiscall
CPhysSaveRestoreBlockHandler::Save(CPhysSaveRestoreBlockHandler *this,ISave *param_1)

{
  undefined4 *puVar1;
  uint uVar2;
  int iVar3;
  undefined *puVar4;
  int iVar5;
  ISave *local_28;
  int local_24;
  undefined4 local_20;
  
  *(undefined4 *)(this + 0x9c) = g_PhysWorldObject;
  iVar5 = *(int *)(this + 0x18);
  *(int *)(this + 0x98) = iVar5;
  while (iVar5 != 0) {
    puVar1 = *(undefined4 **)(this + 0xc);
    uVar2 = puVar1[1];
    if ((((uVar2 != 0xffffffff) &&
         (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar4 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
      (**(code **)(*(int *)param_1 + 0x14))(param_1,puVar1,PhysObjectHeader_t::m_DataMap);
      (**(code **)(*(int *)param_1 + 0x20))(param_1);
      if (0 < (int)puVar1[3]) {
        iVar5 = 0;
        do {
          (**(code **)(*(int *)param_1 + 0x20))(param_1);
          iVar3 = *(int *)(puVar1[0xd] + iVar5 * 4);
          if ((physenv != (int *)0x0) && (iVar3 != 0)) {
            local_28 = param_1;
            local_24 = iVar3;
            local_20 = *puVar1;
            (**(code **)(*physenv + 0xd0))(physenv,&local_28);
          }
          iVar5 = iVar5 + 1;
          (**(code **)(*(int *)param_1 + 0x24))(param_1);
        } while (iVar5 < (int)puVar1[3]);
      }
      (**(code **)(*(int *)param_1 + 0x24))(param_1);
    }
    CUtlPriorityQueue<CPhysSaveRestoreBlockHandler::QueuedItem_t,CDefUtlPriorityQueueLessFunc<CPhysSaveRestoreBlockHandler::QueuedItem_t>,CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int>>
    ::RemoveAtHead((CUtlPriorityQueue<CPhysSaveRestoreBlockHandler::QueuedItem_t,CDefUtlPriorityQueueLessFunc<CPhysSaveRestoreBlockHandler::QueuedItem_t>,CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int>>
                    *)(this + 0xc));
    iVar5 = *(int *)(this + 0x18);
  }
  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)