L L4D2node

NextBotManager::ForEachCombatCharacter<InfectedGroundCollector>

0x00501d00 · 280 bytes · __thiscall

_ZN14NextBotManager22ForEachCombatCharacterI23InfectedGroundCollectorEEbRT_

Decompiled

bool (2 params)

/* bool NextBotManager::ForEachCombatCharacter<InfectedGroundCollector>(InfectedGroundCollector&) */

bool __thiscall
NextBotManager::ForEachCombatCharacter<InfectedGroundCollector>
          (NextBotManager *this,InfectedGroundCollector *param_1)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  Infected *local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  uVar1 = (uint)*(ushort *)(this + 0x10);
  if (uVar1 != 0xffff) {
    iVar3 = *(int *)(this + 4);
    do {
      piVar2 = *(int **)(iVar3 + uVar1 * 8);
      piVar2 = (int *)(**(code **)(*piVar2 + 0xb4))(piVar2);
      if (piVar2 != (int *)0x0) {
        local_38 = (Infected *)(**(code **)(*piVar2 + 0x14c))(piVar2);
        if ((local_38 != (Infected *)0x0) && (((byte)local_38[0x14c] & 1) == 0)) {
          CCollisionProperty::CollisionAABBToWorldAABB
                    ((CCollisionProperty *)(local_38 + 0x194),(Vector *)(local_38 + 0x19c),
                     (Vector *)(local_38 + 0x1a8),(Vector *)&local_34,(Vector *)&local_28);
          if (((*(float *)param_1 <= local_28) &&
              (((local_34 <= *(float *)(param_1 + 0xc) && (*(float *)(param_1 + 4) <= local_24)) &&
               (local_30 <= *(float *)(param_1 + 0x10))))) &&
             ((*(float *)(param_1 + 8) <= local_20 && (local_2c <= *(float *)(param_1 + 0x14))))) {
            CUtlVector<Infected*,CUtlMemory<Infected*,int>>::InsertBefore
                      ((CUtlVector<Infected*,CUtlMemory<Infected*,int>> *)(param_1 + 0x18),
                       *(int *)(param_1 + 0x24),&local_38);
          }
        }
      }
      iVar3 = *(int *)(this + 4);
      uVar1 = (uint)*(ushort *)(iVar3 + 6 + uVar1 * 8);
    } while (uVar1 != 0xffff);
  }
  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)