CAI_Expresser::SpeakRawScene
0x005d2940 · 450 bytes · __thiscall
_ZN13CAI_Expresser13SpeakRawSceneEPKcfP11AI_ResponseP16IRecipientFilter
Decompiled
undefined (5 params)
/* CAI_Expresser::SpeakRawScene(char const*, float, AI_Response*, IRecipientFilter*) */
undefined4 __thiscall
CAI_Expresser::SpeakRawScene
(CAI_Expresser *this,char *param_1,float param_2,AI_Response *param_3,
IRecipientFilter *param_4)
{
float fVar1;
uint uVar2;
int iVar3;
undefined4 uVar4;
undefined *puVar5;
CBaseEntity *pCVar6;
int *piVar7;
int in_GS_OFFSET;
longdouble lVar8;
char local_120 [256];
int local_20;
piVar7 = (int *)0x0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar2 = *(uint *)(this + 0x40);
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
piVar7 = *(int **)(puVar5 + 4);
}
lVar8 = (longdouble)(**(code **)(*piVar7 + 0x3bc))(piVar7,param_1,param_2,param_3,param_4);
fVar1 = (float)lVar8;
if (fVar1 <= 0.0) {
uVar4 = 0;
}
else {
uVar2 = *(uint *)(this + 0x40);
pCVar6 = (CBaseEntity *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
pCVar6 = *(CBaseEntity **)(puVar5 + 4);
}
SpeechMsg(this,pCVar6,"SpeakRawScene( %s, %f) %f\n",param_1,(double)param_2,(double)fVar1);
uVar2 = *(uint *)(this + 0x40);
pCVar6 = (CBaseEntity *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
pCVar6 = *(CBaseEntity **)(puVar5 + 4);
}
CBaseEntity::GenderExpandString(pCVar6,param_1,local_120,0x100);
iVar3 = GetSceneSpeechCount(local_120);
if (0 < iVar3) {
NoteSpeaking(this,fVar1,param_2);
}
uVar4 = 1;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar4;
}
/* 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.