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 intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.