ResolveFollowupTargetToEntity
0x005b0e80 · 410 bytes · __regparm3
_ZL29ResolveFollowupTargetToEntityR11CAI_ConceptR14AI_CriteriaSetPKcP11AI_Response.isra.32
Decompiled
undefined (4 params)
/* ResolveFollowupTargetToEntity(CAI_Concept&, AI_CriteriaSet&, char const*, AI_Response*) [clone
.isra.32] */
CAI_Concept * __regparm3
ResolveFollowupTargetToEntity
(CAI_Concept *param_1,AI_CriteriaSet *param_2,char *param_3,AI_Response *param_4)
{
int iVar1;
int *piVar2;
undefined4 *puVar3;
char *extraout_ECX;
char *pcVar4;
char *extraout_ECX_00;
AI_CriteriaSet *pAVar5;
undefined4 uVar6;
iVar1 = _V_stricmp((char *)param_4,"self");
if (iVar1 == 0) {
uVar6 = *(undefined4 *)(param_2 + 4);
*(undefined4 *)param_1 = 2;
*(undefined4 *)(param_1 + 4) = uVar6;
return param_1;
}
iVar1 = _V_stricmp((char *)param_4,"subject");
pAVar5 = (AI_CriteriaSet *)0xd1457d;
pcVar4 = extraout_ECX;
if (iVar1 != 0) {
iVar1 = _V_stricmp((char *)param_4,"from");
if (iVar1 != 0) {
iVar1 = _V_stricmp((char *)param_4,"any");
if (iVar1 == 0) {
uVar6 = *(undefined4 *)(param_2 + 4);
*(undefined4 *)param_1 = 0;
*(undefined4 *)(param_1 + 4) = uVar6;
return param_1;
}
iVar1 = _V_stricmp((char *)param_4,"all");
if (iVar1 == 0) {
*(undefined4 *)param_1 = 1;
*(undefined4 *)(param_1 + 4) = 0xffffffff;
return param_1;
}
iVar1 = GetCharacterFromName((char *)param_4);
if (7 < iVar1) {
piVar2 = (int *)CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,(char *)param_4,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(IEntityFindFilter *)0x0);
if (piVar2 != (int *)0x0) {
puVar3 = (undefined4 *)(**(code **)(*piVar2 + 0xc))(piVar2);
uVar6 = *puVar3;
*(undefined4 *)param_1 = 2;
*(undefined4 *)(param_1 + 4) = uVar6;
return param_1;
}
Warning("Couldn\'t resolve response target %s\n",param_4);
*(undefined4 *)param_1 = 3;
*(undefined4 *)(param_1 + 4) = 0xffffffff;
return param_1;
}
piVar2 = (int *)CTerrorPlayer::GetPlayerByCharacter(iVar1);
goto joined_r0x005b0fa8;
}
pAVar5 = (AI_CriteriaSet *)0xcc1691;
pcVar4 = extraout_ECX_00;
}
piVar2 = (int *)AscertainSpeechSubjectFromContext((AI_Response *)param_3,pAVar5,pcVar4);
joined_r0x005b0fa8:
uVar6 = 0xffffffff;
if (piVar2 != (int *)0x0) {
puVar3 = (undefined4 *)(**(code **)(*piVar2 + 0xc))(piVar2);
uVar6 = *puVar3;
}
*(undefined4 *)(param_1 + 4) = uVar6;
*(undefined4 *)param_1 = 2;
return param_1;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.