L L4D2node

CFuncLadder::FindNearbyDismountPoints

0x00450490 · 329 bytes · __thiscall

_ZN11CFuncLadder24FindNearbyDismountPointsERK6VectorfR10CUtlVectorI7CHandleI19CInfoLadderDismountE10CUtlMemoryIS6_iEE

Decompiled

undefined (4 params)

/* CFuncLadder::FindNearbyDismountPoints(Vector const&, float,
   CUtlVector<CHandle<CInfoLadderDismount>, CUtlMemory<CHandle<CInfoLadderDismount>, int> >&) */

void __thiscall
CFuncLadder::FindNearbyDismountPoints
          (CFuncLadder *this,Vector *param_1,float param_2,CUtlVector *param_3)

{
  int *piVar1;
  int iVar2;
  uint uVar3;
  CFuncLadder *pCVar4;
  uint *puVar5;
  int iVar6;
  undefined *puVar7;
  int iVar8;
  int iVar9;
  CBaseEntity *local_40;
  uint local_20 [4];
  
  local_40 = (CBaseEntity *)0x0;
LAB_004504a0:
  local_40 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByClassnameWithin
                       ((CGlobalEntityList *)gEntList,local_40,"info_ladder_dismount",param_1,
                        param_2);
  if (local_40 == (CBaseEntity *)0x0) {
    return;
  }
  if (*(int *)(local_40 + 0xf8) != 0) goto code_r0x004504e5;
  goto LAB_004504f5;
code_r0x004504e5:
  pCVar4 = (CFuncLadder *)CBaseEntity::GetNextTarget(local_40);
  if (pCVar4 == this) {
LAB_004504f5:
    local_20[0] = 0xffffffff;
    puVar5 = (uint *)(**(code **)(*(int *)local_40 + 0xc))(local_40);
    local_20[0] = *puVar5;
    iVar2 = *(int *)(param_3 + 0xc);
    if (0 < iVar2) {
      piVar1 = (int *)(g_pEntityList + (local_20[0] & 0xfff) * 0x10 + 4);
      iVar6 = 0;
      do {
        iVar8 = 0;
        if (local_20[0] != 0xffffffff) {
          if (piVar1 == (int *)0x0) {
            iVar8 = 0;
          }
          else if (piVar1[1] == local_20[0] >> 0xc) {
            iVar8 = *piVar1;
          }
        }
        uVar3 = *(uint *)(*(int *)param_3 + iVar6 * 4);
        iVar9 = 0;
        if (((uVar3 != 0xffffffff) &&
            (puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar7 + 8) == uVar3 >> 0xc)) {
          iVar9 = *(int *)(puVar7 + 4);
        }
        if (iVar8 == iVar9) goto LAB_004504a0;
        iVar6 = iVar6 + 1;
      } while (iVar6 != iVar2);
    }
    CUtlVector<CHandle<CInfoLadderDismount>,CUtlMemory<CHandle<CInfoLadderDismount>,int>>::
    InsertBefore((CUtlVector<CHandle<CInfoLadderDismount>,CUtlMemory<CHandle<CInfoLadderDismount>,int>>
                  *)param_3,iVar2,(CHandle *)local_20);
  }
  goto LAB_004504a0;
}

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)