L L4D2node

CFrameSnapshotManager::GetCachedUncompressedEntity

0x001f2970 · 363 bytes · __thiscall

_ZN21CFrameSnapshotManager27GetCachedUncompressedEntityEP12PackedEntity

Decompiled

undefined (2 params)

/* CFrameSnapshotManager::GetCachedUncompressedEntity(PackedEntity*) */

int * __thiscall
CFrameSnapshotManager::GetCachedUncompressedEntity
          (CFrameSnapshotManager *this,PackedEntity *param_1)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  int local_28;
  int *local_24;
  int local_20;
  
  local_20 = *(int *)(this + 0x94);
  if (local_20 == 0) {
    *(undefined4 *)(this + 0x84) = 0;
    *(undefined4 *)(this + 0x94) = 0;
    CUtlVector<UnpackedDataCache_t,CUtlMemory<UnpackedDataCache_t,int>>::GrowVector
              ((CUtlVector<UnpackedDataCache_t,CUtlMemory<UnpackedDataCache_t,int>> *)(this + 0x88),
               0x80);
    iVar1 = *(int *)(this + 0x94);
    if (0 < iVar1 + -0x80) {
      _V_memmove((void *)((int)*(void **)(this + 0x88) + 0x200600),*(void **)(this + 0x88),
                 (iVar1 + -0x80) * 0x400c);
      iVar1 = *(int *)(this + 0x94);
    }
    if (iVar1 < 1) {
      local_28 = *(int *)(this + 0x84) + 1;
      *(int *)(this + 0x84) = local_28;
      local_24 = (int *)0x0;
      goto LAB_001f29f7;
    }
    iVar1 = 0;
    iVar2 = 0;
    do {
      iVar2 = iVar2 + 1;
      *(undefined4 *)(*(int *)(this + 0x88) + iVar1) = 0;
      *(undefined4 *)(*(int *)(this + 0x88) + 4 + iVar1) = 0;
      iVar1 = iVar1 + 0x400c;
      local_20 = *(int *)(this + 0x94);
    } while (iVar2 < local_20);
  }
  local_28 = *(int *)(this + 0x84) + 1;
  *(int *)(this + 0x84) = local_28;
  if (0 < local_20) {
    piVar4 = *(int **)(this + 0x88);
    if ((PackedEntity *)*piVar4 != param_1) {
      iVar2 = 0;
      local_24 = (int *)0x0;
      piVar3 = piVar4;
      iVar1 = local_28;
      do {
        piVar4 = piVar3 + 0x1003;
        if (piVar3[1] < iVar1) {
          iVar1 = piVar3[1];
          local_24 = piVar3;
        }
        iVar2 = iVar2 + 1;
        if (iVar2 == local_20) goto LAB_001f29f7;
        piVar3 = piVar4;
      } while ((PackedEntity *)*piVar4 != param_1);
    }
    piVar4[1] = local_28;
    return piVar4;
  }
  local_24 = (int *)0x0;
LAB_001f29f7:
  local_24[2] = -1;
  local_24[1] = local_28;
  *local_24 = (int)param_1;
  return local_24;
}

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)