AI_CriteriaSet::Merge
0x005a9b60 · 253 bytes · __thiscall
_ZN14AI_CriteriaSet5MergeEPKc
Decompiled
undefined (2 params)
/* AI_CriteriaSet::Merge(char const*) */
void __thiscall AI_CriteriaSet::Merge(AI_CriteriaSet *this,char *param_1)
{
char *pcVar1;
int iVar2;
int in_GS_OFFSET;
char local_21f [128];
char local_19f [128];
char local_11f [255];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((param_1 != (char *)0x0) && (*param_1 != '\0')) {
pcVar1 = local_21f;
for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {
pcVar1[0] = '\0';
pcVar1[1] = '\0';
pcVar1[2] = '\0';
pcVar1[3] = '\0';
pcVar1 = pcVar1 + 4;
}
pcVar1 = local_19f;
for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {
pcVar1[0] = '\0';
pcVar1[1] = '\0';
pcVar1[2] = '\0';
pcVar1[3] = '\0';
pcVar1 = pcVar1 + 4;
}
pcVar1 = local_11f;
V_strncpy(pcVar1,param_1,0xff);
do {
pcVar1 = (char *)SplitContext(pcVar1,local_21f,0x80,local_19f,0x80,(float *)0x0,param_1);
if ((local_21f[0] != '\0') && (local_19f[0] != '\0')) {
AppendCriteria(this,local_21f,local_19f,5.0);
}
} while (pcVar1 != (char *)0x0);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.