L L4D2node

BuildTeleportList_r

0x006136b0 · 353 bytes · __regparm3

_ZL19BuildTeleportList_rP11CBaseEntityR10CUtlVectorI19TeleportListEntry_t10CUtlMemoryIS2_iEE

Decompiled

undefined (2 params)

/* BuildTeleportList_r(CBaseEntity*, CUtlVector<TeleportListEntry_t, CUtlMemory<TeleportListEntry_t,
   int> >&) */

void __regparm3 BuildTeleportList_r(CBaseEntity *param_1,CUtlVector *param_2)

{
  uint uVar1;
  undefined *puVar2;
  CBaseEntity *pCVar3;
  CBaseEntity *local_28;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  local_28 = param_1;
  if (((byte)param_1[0x14d] & 8) == 0) {
    local_24 = *(undefined4 *)(param_1 + 0x2e0);
    local_20 = *(undefined4 *)(param_1 + 0x2e4);
    local_1c = *(undefined4 *)(param_1 + 0x2e8);
  }
  else {
    CBaseEntity::CalcAbsolutePosition(param_1);
    local_24 = *(undefined4 *)(param_1 + 0x2e0);
    local_20 = *(undefined4 *)(param_1 + 0x2e4);
    local_1c = *(undefined4 *)(param_1 + 0x2e8);
    if ((*(uint *)(param_1 + 0x14c) & 0x800) != 0) {
      CBaseEntity::CalcAbsolutePosition(param_1);
    }
  }
  local_18 = *(undefined4 *)(param_1 + 0x37c);
  local_14 = *(undefined4 *)(param_1 + 0x380);
  local_10 = *(undefined4 *)(param_1 + 900);
  CUtlVector<TeleportListEntry_t,CUtlMemory<TeleportListEntry_t,int>>::InsertBefore
            ((CUtlVector<TeleportListEntry_t,CUtlMemory<TeleportListEntry_t,int>> *)param_2,
             *(int *)(param_2 + 0xc),(TeleportListEntry_t *)&local_28);
  uVar1 = *(uint *)(param_1 + 0x18c);
  if ((((uVar1 != 0xffffffff) &&
       (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar2 + 8) == uVar1 >> 0xc)) &&
     (pCVar3 = *(CBaseEntity **)(puVar2 + 4), pCVar3 != (CBaseEntity *)0x0)) {
    while( true ) {
      BuildTeleportList_r(pCVar3,param_2);
      uVar1 = *(uint *)(pCVar3 + 400);
      if ((uVar1 == 0xffffffff) ||
         (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc))
      break;
      if (*(uint *)(puVar2 + 8) != uVar1 >> 0xc) {
        return;
      }
      pCVar3 = *(CBaseEntity **)(puVar2 + 4);
      if (pCVar3 == (CBaseEntity *)0x0) {
        return;
      }
    }
  }
  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)