CSpeechScriptBridge::Script_GetExpressers
0x0080b690 · 332 bytes · __cdecl
_ZN19CSpeechScriptBridge20Script_GetExpressersEv
Decompiled
undefined (0 params)
/* CSpeechScriptBridge::Script_GetExpressers() */
void * CSpeechScriptBridge::Script_GetExpressers(void)
{
int iVar1;
uint uVar2;
CBaseEntity *this;
code *pcVar3;
undefined4 uVar4;
void *pvVar5;
undefined *puVar6;
undefined4 uVar7;
char *pcVar8;
int iVar9;
void *local_48;
void *local_34 [2];
ushort local_2c;
ushort local_2a;
void *local_28 [2];
undefined2 local_20;
ushort local_1e;
uVar4 = g_ResponseQueueManager._12_4_;
local_2c = 0;
local_34[0] = (void *)0x0;
iVar1 = *(int *)(g_ResponseQueueManager._12_4_ + 0x38);
local_2a = 0;
/* try { // try from 0080b6cb to 0080b733 has its CatchHandler @ 0080b7fd */
(**(code **)(*g_pScriptVM + 0x80))(g_pScriptVM,local_34);
iVar9 = 0;
if (0 < iVar1) {
do {
while ((((uVar2 = *(uint *)(*(int *)(uVar4 + 0x2c) + iVar9 * 4), uVar2 == 0xffffffff ||
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar6 + 8) != uVar2 >> 0xc)) ||
(this = *(CBaseEntity **)(puVar6 + 4), this == (CBaseEntity *)0x0))) {
LAB_0080b6e0:
iVar9 = iVar9 + 1;
if (iVar9 == iVar1) goto LAB_0080b78e;
}
pcVar3 = *(code **)(*g_pScriptVM + 0x78);
local_28[0] = (void *)CBaseEntity::GetScriptInstance(this);
local_20 = 0x20;
local_1e = 0;
/* try { // try from 0080b74c to 0080b76c has its CatchHandler @ 0080b7e0 */
uVar7 = GetResponseName(this);
(*pcVar3)(g_pScriptVM,local_34[0],uVar7,local_28);
if ((local_1e & 1) == 0) goto LAB_0080b6e0;
iVar9 = iVar9 + 1;
free(local_28[0]);
} while (iVar9 != iVar1);
}
LAB_0080b78e:
pvVar5 = local_34[0];
if (local_2c != 0x20) {
pcVar8 = "unknown_variant_type";
if (local_2c < 0x29) {
pcVar8 = *(char **)(CSWTCH_760 + (uint)local_2c * 4);
}
/* try { // try from 0080b7b1 to 0080b7b5 has its CatchHandler @ 0080b7fd */
Warning("No free conversion of %s variant to HSCRIPT right now\n",pcVar8);
pvVar5 = local_48;
}
local_48 = pvVar5;
if ((local_2a & 1) != 0) {
free(local_34[0]);
}
return local_48;
}
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.