CVScriptGameEventListener::RunGameEventCallbacks
0x00b47f00 · 275 bytes · __thiscall
_ZN25CVScriptGameEventListener21RunGameEventCallbacksEPKcP9HSCRIPT__
Decompiled
undefined (3 params)
/* CVScriptGameEventListener::RunGameEventCallbacks(char const*, HSCRIPT__*) */
void __thiscall
CVScriptGameEventListener::RunGameEventCallbacks
(CVScriptGameEventListener *this,char *param_1,HSCRIPT__ *param_2)
{
int iVar1;
char *local_24;
undefined4 local_20;
undefined2 local_1c;
ushort local_1a;
HSCRIPT__ *local_18;
undefined4 local_14;
undefined2 local_10;
ushort local_e;
if (param_1 != (char *)0x0) {
iVar1 = *(int *)(this + 0xc);
if (iVar1 == -1) {
iVar1 = (**(code **)(*g_pScriptVM + 0x48))(g_pScriptVM,"__RunGameEventCallbacks",0,0);
*(int *)(this + 0xc) = iVar1;
}
if (iVar1 != 0) {
local_24 = param_1;
local_1a = 0;
local_1c = 0x1f;
local_10 = 0x20;
local_e = 0;
local_20 = 0;
local_14 = 0;
local_18 = param_2;
/* try { // try from 00b47f95 to 00b47f97 has its CatchHandler @ 00b48020 */
(**(code **)(*g_pScriptVM + 0x50))(g_pScriptVM,iVar1,&local_24,2,0,0,1);
if ((local_e & 1) != 0) {
free(local_18);
local_e = local_e & 0xfffe;
}
local_18 = (HSCRIPT__ *)0x0;
local_14 = 0;
local_10 = 0;
if ((local_1a & 1) != 0) {
free(local_24);
return;
}
}
}
return;
}
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.