L L4D2node

CScriptResponseCriteria::HasCriterion

0x00b44730 · 149 bytes · __thiscall

_ZN23CScriptResponseCriteria12HasCriterionEP9HSCRIPT__PKc

Decompiled

undefined (3 params)

/* CScriptResponseCriteria::HasCriterion(HSCRIPT__*, char const*) */

bool __thiscall
CScriptResponseCriteria::HasCriterion
          (CScriptResponseCriteria *this,HSCRIPT__ *param_1,char *param_2)

{
  code *pcVar1;
  ScriptClassDesc_t *pSVar2;
  int *piVar3;
  int iVar4;
  AI_CriteriaSet local_2c [18];
  short local_1a;
  
  if (param_1 != (HSCRIPT__ *)0x0) {
    pcVar1 = *(code **)(*g_pScriptVM + 0x68);
    pSVar2 = GetScriptDesc<CBaseEntity>((CBaseEntity *)0x0);
    piVar3 = (int *)(*pcVar1)(g_pScriptVM,param_1,pSVar2);
    if (piVar3 != (int *)0x0) {
      AI_CriteriaSet::AI_CriteriaSet(local_2c);
                    /* try { // try from 00b44785 to 00b44799 has its CatchHandler @ 00b447c9 */
      (**(code **)(*piVar3 + 0x200))(piVar3,local_2c);
      iVar4 = AI_CriteriaSet::FindCriterionIndex(local_2c,param_2);
      AI_CriteriaSet::~AI_CriteriaSet(local_2c);
      return -1 < iVar4 && iVar4 < local_1a;
    }
  }
  return false;
}

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)