L L4D2node

CResponseSystem::LookForCriteria

0x005b4fa0 · 139 bytes · __thiscall

_ZN15CResponseSystem15LookForCriteriaERK14AI_CriteriaSeti

Decompiled

undefined (3 params)

/* CResponseSystem::LookForCriteria(AI_CriteriaSet const&, int) */

longdouble __thiscall
CResponseSystem::LookForCriteria(CResponseSystem *this,AI_CriteriaSet *param_1,int param_2)

{
  char *pcVar1;
  int iVar2;
  char *pcVar3;
  int iVar4;
  longdouble lVar5;
  undefined2 local_e;
  
  iVar4 = (param_2 & 0xffffU) * 0x34 + *(int *)(this + 0x48);
  if (0 < *(int *)(iVar4 + 0x2a)) {
    lVar5 = (longdouble)RecursiveLookForCriteria(this,param_1,(Criteria *)(iVar4 + 0xc));
    return lVar5;
  }
  local_e = *(undefined2 *)(iVar4 + 0xc);
  iVar2 = AI_CriteriaSet::FindCriterionIndex(param_1,&local_e);
  if (iVar2 != -1) {
    pcVar1 = *(char **)(iVar4 + 0xe);
    pcVar3 = (char *)AI_CriteriaSet::GetValue(param_1,iVar2);
    iVar4 = _V_stricmp(pcVar3,pcVar1);
    if (iVar4 == 0) {
      return (longdouble)1;
    }
  }
  return (longdouble)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)