L L4D2node

IVision::ForEachRecognized<VisibleThreatCollector>

0x0094e1d0 · 204 bytes · __thiscall

_ZN7IVision17ForEachRecognizedI22VisibleThreatCollectorEEbRT_

Decompiled

bool (2 params)

/* bool IVision::ForEachRecognized<VisibleThreatCollector>(VisibleThreatCollector&) */

bool __thiscall
IVision::ForEachRecognized<VisibleThreatCollector>(IVision *this,VisibleThreatCollector *param_1)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  undefined *puVar4;
  int iVar5;
  int iVar6;
  CBaseCombatCharacter *local_20 [4];
  
  iVar6 = 0;
  iVar5 = 0;
  if (0 < *(int *)(this + 0x38)) {
    do {
      while ((((*(float *)(gpGlobals + 0xc) < (float)((uint *)(*(int *)(this + 0x2c) + iVar5))[4] ||
               (uVar1 = *(uint *)(*(int *)(this + 0x2c) + iVar5), uVar1 == 0xffffffff)) ||
              (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc))
             || (((*(uint *)(puVar4 + 8) != uVar1 >> 0xc ||
                  (piVar2 = *(int **)(puVar4 + 4), piVar2 == (int *)0x0)) ||
                 (iVar3 = (**(code **)(*piVar2 + 0x144))(piVar2), iVar3 == 0))))) {
        iVar6 = iVar6 + 1;
        iVar5 = iVar5 + 0x14;
        if (*(int *)(this + 0x38) <= iVar6) {
          return true;
        }
      }
      iVar6 = iVar6 + 1;
      iVar5 = iVar5 + 0x14;
      local_20[0] = (CBaseCombatCharacter *)(**(code **)(*piVar2 + 0x144))(piVar2);
      CUtlVector<CBaseCombatCharacter*,CUtlMemory<CBaseCombatCharacter*,int>>::InsertBefore
                ((CUtlVector<CBaseCombatCharacter*,CUtlMemory<CBaseCombatCharacter*,int>> *)param_1,
                 *(int *)(param_1 + 0xc),local_20);
    } while (iVar6 < *(int *)(this + 0x38));
  }
  return true;
}

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)