L L4D2node

Rule::GetValueForRuleCriterionByName

0x005b5fc0 · 100 bytes · __thiscall

_ZN4Rule30GetValueForRuleCriterionByNameEP15CResponseSystemRK10CUtlSymbol

Decompiled

undefined (3 params)

/* Rule::GetValueForRuleCriterionByName(CResponseSystem*, CUtlSymbol const&) */

int __thiscall
Rule::GetValueForRuleCriterionByName(Rule *this,CResponseSystem *param_1,CUtlSymbol *param_2)

{
  ushort *puVar1;
  int iVar2;
  int iVar3;
  ushort *puVar4;
  
  if (0 < *(int *)(this + 8)) {
    puVar4 = *(ushort **)this;
    puVar1 = puVar4 + *(int *)(this + 8);
    iVar2 = *(int *)(param_1 + 0x48);
    do {
      iVar3 = RecursiveGetValueForRuleCriterionByName
                        (this,param_1,(Criteria *)(iVar2 + 0xc + (uint)*puVar4 * 0x34),param_2);
      if (iVar3 != 0) {
        return iVar3;
      }
      puVar4 = puVar4 + 1;
    } while (puVar4 != puVar1);
  }
  return 0;
}

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)