CAI_Expresser::GatherCriteria
0x005d1ee0 · 166 bytes · __thiscall
_ZN13CAI_Expresser14GatherCriteriaEP14AI_CriteriaSetRK11CAI_ConceptPKc
Decompiled
undefined (4 params)
/* CAI_Expresser::GatherCriteria(AI_CriteriaSet*, CAI_Concept const&, char const*) */
void __thiscall
CAI_Expresser::GatherCriteria
(CAI_Expresser *this,AI_CriteriaSet *param_1,CAI_Concept *param_2,char *param_3)
{
int iVar1;
void *pvVar2;
char *pcVar3;
iVar1 = GatherCriteria(AI_CriteriaSet*,CAI_Concept_const&,char_const*)::snPreviousCriteriaCount +
(GatherCriteria(AI_CriteriaSet*,CAI_Concept_const&,char_const*)::snPreviousCriteriaCount
>> 2);
if ((*(int *)(param_1 + 8) < iVar1) && (-1 < *(int *)(param_1 + 0xc))) {
*(int *)(param_1 + 8) = iVar1;
if (*(void **)(param_1 + 4) == (void *)0x0) {
pvVar2 = malloc(iVar1 * 0x50);
*(void **)(param_1 + 4) = pvVar2;
}
else {
pvVar2 = realloc(*(void **)(param_1 + 4),iVar1 * 0x50);
*(void **)(param_1 + 4) = pvVar2;
}
}
pcVar3 = (char *)CAI_Concept::GetStringConcept((CAI_Concept *)param_2);
AI_CriteriaSet::AppendCriteria(param_1,"concept",pcVar3,5.0);
AI_CriteriaSet::Merge(param_1,param_3);
GatherLocalCriteria(this,param_1);
GatherCriteria(AI_CriteriaSet*,CAI_Concept_const&,char_const*)::snPreviousCriteriaCount =
AI_CriteriaSet::GetCount(param_1);
return;
}
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.