CBaseClient::FireGameEvent
0x000f9370 · 705 bytes · __thiscall
_ZN11CBaseClient13FireGameEventEP10IGameEvent
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBaseClient::FireGameEvent(IGameEvent*) */
void __thiscall CBaseClient::FireGameEvent(CBaseClient *this,IGameEvent *param_1)
{
code *pcVar1;
char cVar2;
undefined1 uVar3;
char *pcVar4;
int iVar5;
undefined4 uVar6;
int in_GS_OFFSET;
undefined4 local_4c4;
undefined4 local_4c0;
undefined4 local_4b8;
undefined4 local_4b4;
int local_4b0;
undefined **local_4ac;
undefined1 local_4a8;
undefined4 local_4a4;
undefined4 local_4a0;
undefined4 local_49c;
undefined8 local_498;
undefined4 local_490;
undefined4 local_48c;
undefined8 local_488;
undefined4 local_480;
undefined4 local_47c;
undefined1 local_478;
undefined8 local_474;
undefined4 local_46c;
undefined4 local_468;
undefined4 local_45c;
undefined1 local_458;
undefined4 local_454;
undefined4 local_450;
bf_write local_438 [24];
undefined1 local_420 [1024];
int local_20;
local_4c4 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_4c0 = 0;
if (_g_Telemetry == 0) {
local_4b0 = 0;
}
else {
(**(code **)(_g_Telemetry + 0x50))
(_g_Telemetry,&local_4c4,0,0x32,0,0,"/data/src/engine/./baseclient.cpp",0x2c5,
&FireGameEvent(IGameEvent*)::tm_fmt,&DAT_002c48a3,"FireGameEvent");
local_4b0 = _g_Telemetry;
}
local_4a0 = 0;
local_49c = 0;
local_498 = 0;
local_490 = 0;
local_48c = 0;
local_488 = 0;
local_480 = 0;
local_47c = 0;
local_478 = 0;
local_474 = 0;
local_46c = 0;
local_468 = 0;
local_4a8 = 1;
local_4a4 = 0;
local_4ac = &PTR__SVC_GameEvent_002a1f48;
local_458 = 0;
local_45c = 0;
local_454 = 0xffffffff;
local_450 = 0;
local_4b8 = local_4c4;
local_4b4 = local_4c0;
/* try { // try from 000f94e6 to 000f94ea has its CatchHandler @ 000f9664 */
bf_write::bf_write(local_438);
/* try { // try from 000f9510 to 000f9587 has its CatchHandler @ 000f9642 */
bf_write::StartWriting(local_438,local_420,0x400,0,-1);
cVar2 = (**(code **)(s_GameEventManager + 0x30))(&s_GameEventManager,param_1,local_438);
if (cVar2 == '\0') {
uVar6 = (**(code **)(*(int *)param_1 + 8))(param_1);
DevMsg("GameEventManager: failed to serialize event \'%s\'.\n",uVar6);
}
else if (*(int **)(this + 0xe8) != (int *)0x0) {
pcVar1 = *(code **)(**(int **)(this + 0xe8) + 0xa8);
uVar3 = (**(code **)(*(int *)param_1 + 0xc))(param_1);
(*pcVar1)(*(undefined4 *)(this + 0xe8),&local_4ac,uVar3,0);
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
iVar5 = _V_stricmp(pcVar4,"server_pre_shutdown");
if (iVar5 == 0) {
/* try { // try from 000f9603 to 000f9637 has its CatchHandler @ 000f9642 */
(**(code **)(**(int **)(this + 0xe8) + 0xc4))(*(int **)(this + 0xe8),0);
}
}
local_4ac = &PTR__INetMessage_002a1188;
if (local_4b0 != 0) {
(**(code **)(local_4b0 + 0x54))(local_4b0,local_4b8,local_4b4,0,0,0);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.