AI_CriteriaSet::AI_CriteriaSet
0x005aa230 · 189 bytes · __thiscall
_ZN14AI_CriteriaSetC1ERKS_
Decompiled
undefined (2 params)
/* AI_CriteriaSet::AI_CriteriaSet(AI_CriteriaSet const&) */
void __thiscall AI_CriteriaSet::AI_CriteriaSet(AI_CriteriaSet *this,AI_CriteriaSet *param_1)
{
short sVar1;
int iVar2;
void *pvVar3;
*(code **)this = CritEntry_t::LessFunc;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
*(undefined4 *)(this + 0xc) = 0;
*(undefined2 *)(this + 0x10) = 0xffff;
*(undefined2 *)(this + 0x12) = 0;
*(undefined2 *)(this + 0x14) = 0xffff;
*(undefined2 *)(this + 0x16) = 0xffff;
*(undefined4 *)(this + 0x18) = 0;
*(undefined4 *)(this + 0x1c) = *(undefined4 *)(param_1 + 0x1c);
iVar2 = (int)*(short *)(param_1 + 0x12);
if (0 < iVar2) {
*(int *)(this + 8) = iVar2;
pvVar3 = malloc(iVar2 * 0x50);
*(void **)(this + 4) = pvVar3;
}
for (sVar1 = CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
::FirstInorder((CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
*)param_1); sVar1 != -1;
sVar1 = CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
::NextInorder((CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
*)param_1,sVar1)) {
/* try { // try from 005aa2ce to 005aa2d2 has its CatchHandler @ 005aa2ed */
CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
::Insert((CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
*)this,(CritEntry_t *)(sVar1 * 0x50 + *(int *)(param_1 + 4) + 8));
}
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.