L L4D2node

SendTable_BuildHierarchy

0x00142640 · 292 bytes · __cdecl

_Z24SendTable_BuildHierarchyP9CSendNodePK9SendTableP21CBuildHierarchyStruct

Decompiled

undefined (3 params)

/* SendTable_BuildHierarchy(CSendNode*, SendTable const*, CBuildHierarchyStruct*) */

void SendTable_BuildHierarchy(CSendNode *param_1,SendTable *param_2,CBuildHierarchyStruct *param_3)

{
  CBuildHierarchyStruct CVar1;
  int iVar2;
  int local_4024;
  int local_401c;
  SendProp *local_4018 [4098];
  
  local_401c = 0;
  *(SendTable **)(param_1 + 0x18) = param_2;
  *(short *)(param_1 + 0x1c) = (short)*(undefined4 *)(param_3 + 0x9004);
  CVar1 = param_3[0x9008];
  param_3[0x9008] = (CBuildHierarchyStruct)((char)CVar1 + '\x01');
  SendTable_BuildHierarchy_IterateProps(param_1,param_2,param_3,local_4018,&local_401c);
  local_4024 = *(int *)(param_3 + 0x9004);
  if (0xffe < (uint)(local_4024 + local_401c)) {
    Error("SendTable_BuildHierarchy: overflowed prop buffer.");
    local_4024 = *(int *)(param_3 + 0x9004);
  }
  if (0 < local_401c) {
    iVar2 = 0;
    do {
      *(SendProp **)(param_3 + iVar2 * 4 + local_4024 * 4 + 0x4008) = local_4018[iVar2];
      param_3[iVar2 + local_4024 + 0x8004] = CVar1;
      iVar2 = iVar2 + 1;
    } while (iVar2 != local_401c);
    local_4024 = local_4024 + iVar2;
    *(int *)(param_3 + 0x9004) = local_4024;
  }
  *(short *)(param_1 + 0x1e) = (short)local_4024 - *(short *)(param_1 + 0x1c);
  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)