CRuleScriptBridge::ResponseQueryToScript
0x0080aa90 · 471 bytes · __thiscall
_ZN17CRuleScriptBridge21ResponseQueryToScriptEPKN3rr214CResponseQueryE
Decompiled
undefined (2 params)
/* CRuleScriptBridge::ResponseQueryToScript(rr2::CResponseQuery const*) */
CRuleScriptBridge * __thiscall
CRuleScriptBridge::ResponseQueryToScript(CRuleScriptBridge *this,CResponseQuery *param_1)
{
int iVar1;
code *pcVar2;
void *pvVar3;
undefined4 uVar4;
undefined4 uVar5;
char *pcVar6;
undefined2 *puVar7;
int iVar8;
void *local_4c;
undefined2 local_38;
undefined2 local_36;
void *local_34 [2];
ushort 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 0080aac0 to 0080ab40 has its CatchHandler @ 0080acb6 */
(**(code **)(*g_pScriptVM + 0x80))(g_pScriptVM,local_34);
iVar1 = *(int *)(param_1 + 0xc);
if (0 < iVar1) {
iVar8 = 0;
do {
while( true ) {
puVar7 = (undefined2 *)(iVar8 * 0x10 + *(int *)param_1);
if ((*(uint *)(puVar7 + 6) & 0x7f800000) != 0x7f800000) break;
pcVar2 = *(code **)(*g_pScriptVM + 0x74);
local_38 = puVar7[4];
uVar5 = CUtlSymbolTable::String((CUtlSymbolTable *)(*(int *)(param_1 + 0x14) + 4),&local_38)
;
local_28[0] = (void *)CONCAT22(local_28[0]._2_2_,*puVar7);
uVar4 = CUtlSymbolTable::String((CUtlSymbolTable *)(*(int *)(param_1 + 0x14) + 4),local_28);
(*pcVar2)(g_pScriptVM,local_34[0],uVar4,uVar5);
LAB_0080ab41:
iVar8 = iVar8 + 1;
if (iVar8 == iVar1) goto LAB_0080abf0;
}
pcVar2 = *(code **)(*g_pScriptVM + 0x78);
local_28[0] = *(void **)(puVar7 + 6);
local_1e = 0;
local_20 = 1;
local_36 = *puVar7;
/* try { // try from 0080aba7 to 0080abc7 has its CatchHandler @ 0080aca8 */
uVar5 = CUtlSymbolTable::String((CUtlSymbolTable *)(*(int *)(param_1 + 0x14) + 4),&local_36);
(*pcVar2)(g_pScriptVM,local_34[0],uVar5,local_28);
if ((local_1e & 1) == 0) goto LAB_0080ab41;
iVar8 = iVar8 + 1;
free(local_28[0]);
} while (iVar8 != iVar1);
}
LAB_0080abf0:
*(undefined4 *)this = 0;
pvVar3 = local_34[0];
if (local_2c != 0x20) {
pcVar6 = "unknown_variant_type";
if (local_2c < 0x29) {
pcVar6 = *(char **)(CSWTCH_760 + (uint)local_2c * 4);
}
/* try { // try from 0080ac1c to 0080ac3a has its CatchHandler @ 0080ac6f */
Warning("No free conversion of %s variant to HSCRIPT right now\n",pcVar6);
pvVar3 = local_4c;
if (*(int *)this != 0) {
(**(code **)(*g_pScriptVM + 0x30))(g_pScriptVM,*(int *)this);
}
}
local_4c = pvVar3;
*(void **)this = local_4c;
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.