CSpeechScriptBridge::FindBestResponse
0x00809df0 · 227 bytes · __cdecl
_ZN19CSpeechScriptBridge16FindBestResponseERK14AI_CriteriaSetRN3rr211MatchInfo_tER11AI_ResponseP15IResponseFilter
Decompiled
undefined (4 params)
/* CSpeechScriptBridge::FindBestResponse(AI_CriteriaSet const&, rr2::MatchInfo_t&, AI_Response&,
IResponseFilter*) */
undefined4
CSpeechScriptBridge::FindBestResponse
(AI_CriteriaSet *param_1,MatchInfo_t *param_2,AI_Response *param_3,
IResponseFilter *param_4)
{
float fVar1;
undefined4 uVar2;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined1 local_20;
local_38 = 0;
local_34 = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = *(undefined4 *)(param_1 + 0x10);
local_20 = 0;
/* try { // try from 00809e3d to 00809ea5 has its CatchHandler @ 00809ed9 */
MapOldToNewQuery((CSpeechScriptBridge *)param_1,(AI_CriteriaSet *)param_2,
(CResponseQuery *)&local_38);
(**(code **)(**(int **)(param_1 + 0x10) + 8))
(&local_4c,*(int **)(param_1 + 0x10),
(CUtlMemory<rr2::CResponseQuery::CFact,int> *)&local_38,0);
*(undefined4 *)param_3 = local_4c;
fVar1 = *(float *)param_3;
*(undefined4 *)(param_3 + 4) = local_48;
*(undefined4 *)(param_3 + 8) = local_44;
if ((fVar1 == -2.1474836e+09) || (fVar1 <= 0.0)) {
uVar2 = 0;
}
else {
uVar2 = MakeOldResponse((CSpeechScriptBridge *)param_1,(AI_Response *)param_4,
*(CSpeechResponse_t **)(param_3 + 8),fVar1);
}
local_2c = 0;
CUtlMemory<rr2::CResponseQuery::CFact,int>::Purge
((CUtlMemory<rr2::CResponseQuery::CFact,int> *)&local_38);
local_28 = local_38;
CUtlMemory<rr2::CResponseQuery::CFact,int>::Purge
((CUtlMemory<rr2::CResponseQuery::CFact,int> *)&local_38);
return uVar2;
}
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.