CAI_Expresser::TestAllResponses
0x005d3610 · 472 bytes · __thiscall
_ZN13CAI_Expresser16TestAllResponsesEv
Decompiled
undefined (1 param)
/* CAI_Expresser::TestAllResponses() */
void __thiscall CAI_Expresser::TestAllResponses(CAI_Expresser *this)
{
uint uVar1;
AI_Response *this_00;
undefined *puVar2;
int *piVar3;
int iVar4;
int iVar5;
int in_GS_OFFSET;
undefined2 local_13c [2];
undefined4 local_138;
int local_134 [5];
char local_120 [256];
int local_20;
piVar3 = (int *)0x0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar1 = *(uint *)(this + 0x40);
if (((uVar1 != 0xffffffff) &&
(puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar2 + 8) == uVar1 >> 0xc)) {
piVar3 = *(int **)(puVar2 + 4);
}
piVar3 = (int *)(**(code **)(*piVar3 + 0xf8))(piVar3);
if (piVar3 != (int *)0x0) {
local_134[0] = 0;
local_134[1] = 0;
local_134[2] = 0;
local_134[3] = 0;
local_134[4] = 0;
/* try { // try from 005d36ae to 005d3743 has its CatchHandler @ 005d37e3 */
(**(code **)(*piVar3 + 0xc))(piVar3,local_134);
if (0 < local_134[3]) {
iVar4 = 0;
iVar5 = 0;
do {
AI_Response::GetResponse((AI_Response *)(local_134[0] + iVar4),local_120,0x100);
Msg("Response: %s\n",local_120);
local_138 = 0xffffffff;
local_13c[0] = 0xffff;
(**(code **)(*(int *)this + 4))(this,local_13c,local_134[0] + iVar4,0,0);
iVar5 = iVar5 + 1;
iVar4 = iVar4 + 0xbc;
} while (iVar5 < local_134[3]);
}
iVar4 = local_134[3] + -1;
iVar5 = iVar4 * 0xbc;
if (-1 < iVar4) {
do {
iVar4 = iVar4 + -1;
this_00 = (AI_Response *)(local_134[0] + iVar5);
iVar5 = iVar5 + -0xbc;
AI_Response::~AI_Response(this_00);
} while (iVar4 != -1);
}
local_134[3] = 0;
CUtlMemory<AI_Response,int>::Purge((CUtlMemory<AI_Response,int> *)local_134);
local_134[4] = local_134[0];
CUtlMemory<AI_Response,int>::Purge((CUtlMemory<AI_Response,int> *)local_134);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.