L L4D2node

Rule::RecursiveGetPointerForRuleCriterionByName

0x005b6030 · 133 bytes · __thiscall

_ZN4Rule41RecursiveGetPointerForRuleCriterionByNameEP15CResponseSystemPK8CriteriaRK10CUtlSymbol

Decompiled

undefined (4 params)

/* Rule::RecursiveGetPointerForRuleCriterionByName(CResponseSystem*, Criteria const*, CUtlSymbol
   const&) */

Criteria * __thiscall
Rule::RecursiveGetPointerForRuleCriterionByName
          (Rule *this,CResponseSystem *param_1,Criteria *param_2,CUtlSymbol *param_3)

{
  ushort *puVar1;
  int iVar2;
  Criteria *pCVar3;
  ushort *puVar4;
  
  if (param_2 != (Criteria *)0x0) {
    if (*(int *)(param_2 + 0x1e) < 1) {
      pCVar3 = (Criteria *)0x0;
      if (*(short *)param_2 == *(short *)param_3) {
        pCVar3 = param_2;
      }
      return pCVar3;
    }
    puVar4 = *(ushort **)(param_2 + 0x16);
    iVar2 = *(int *)(param_1 + 0x48);
    puVar1 = puVar4 + *(int *)(param_2 + 0x1e);
    do {
      pCVar3 = (Criteria *)
               RecursiveGetPointerForRuleCriterionByName
                         (this,param_1,(Criteria *)(iVar2 + 0xc + (uint)*puVar4 * 0x34),param_3);
      if (pCVar3 != (Criteria *)0x0) {
        return pCVar3;
      }
      puVar4 = puVar4 + 1;
    } while (puVar4 != puVar1);
  }
  return (Criteria *)0x0;
}

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)