CSpeechScriptBridge::AICriteriaSetToScript
0x0080b0a0 · 326 bytes · __thiscall
_ZN19CSpeechScriptBridge21AICriteriaSetToScriptEPK14AI_CriteriaSet
Decompiled
undefined (2 params)
/* CSpeechScriptBridge::AICriteriaSetToScript(AI_CriteriaSet const*) */
CSpeechScriptBridge * __thiscall
CSpeechScriptBridge::AICriteriaSetToScript(CSpeechScriptBridge *this,AI_CriteriaSet *param_1)
{
code *pcVar1;
char cVar2;
int iVar3;
char *__nptr;
undefined4 uVar4;
int iVar5;
double dVar6;
void *local_34 [2];
undefined2 local_2c;
ushort local_2a;
void *local_28 [2];
undefined2 local_20;
ushort local_1e;
local_2c = 0;
local_2a = 0;
local_34[0] = (void *)0x0;
/* try { // try from 0080b0cd to 0080b0dd has its CatchHandler @ 0080b206 */
(**(code **)(*g_pScriptVM + 0x80))(g_pScriptVM,local_34);
iVar3 = AI_CriteriaSet::GetCount(param_1);
if (0 < iVar3) {
iVar5 = 0;
do {
while( true ) {
/* try { // try from 0080b175 to 0080b1bd has its CatchHandler @ 0080b206 */
__nptr = (char *)AI_CriteriaSet::GetValue(param_1,iVar5);
cVar2 = CResponseSystem::AppearsToBeANumber(__nptr);
if (cVar2 != '\0') break;
pcVar1 = *(code **)(*g_pScriptVM + 0x74);
uVar4 = AI_CriteriaSet::GetName(param_1,iVar5);
(*pcVar1)(g_pScriptVM,local_34[0],uVar4,__nptr);
iVar5 = iVar5 + 1;
if (iVar5 == iVar3) goto LAB_0080b1c6;
}
pcVar1 = *(code **)(*g_pScriptVM + 0x78);
dVar6 = strtod(__nptr,(char **)0x0);
local_20 = 1;
local_1e = 0;
local_28[0] = (void *)(float)dVar6;
/* try { // try from 0080b134 to 0080b151 has its CatchHandler @ 0080b1e9 */
uVar4 = AI_CriteriaSet::GetName(param_1,iVar5);
(*pcVar1)(g_pScriptVM,local_34[0],uVar4,local_28);
if ((local_1e & 1) != 0) {
free(local_28[0]);
}
iVar5 = iVar5 + 1;
} while (iVar5 != iVar3);
}
LAB_0080b1c6:
*(void **)this = local_34[0];
if ((local_2a & 1) != 0) {
free(local_34[0]);
}
return this;
}
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.