CSteamWorksGameStatsUploader::FireGameEvent
0x004c6b20 · 599 bytes · __thiscall
_ZN28CSteamWorksGameStatsUploader13FireGameEventEP10IGameEvent
Decompiled
undefined (2 params)
/* CSteamWorksGameStatsUploader::FireGameEvent(IGameEvent*) */
void __thiscall
CSteamWorksGameStatsUploader::FireGameEvent(CSteamWorksGameStatsUploader *this,IGameEvent *param_1)
{
char *pcVar1;
int iVar2;
undefined4 uVar3;
if (param_1 == (IGameEvent *)0x0) {
return;
}
pcVar1 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
if (pcVar1 != "hostname_changed") {
iVar2 = _V_stricmp("hostname_changed",pcVar1);
if (iVar2 != 0) {
if (pcVar1 != "server_spawn") {
iVar2 = _V_stricmp("server_spawn",pcVar1);
if (iVar2 != 0) {
if (pcVar1 != "player_first_spawn") {
iVar2 = _V_stricmp("player_first_spawn",pcVar1);
if (iVar2 != 0) goto LAB_004c6b96;
}
InitializeSystem(this);
uVar3 = GetHumanCountInGame();
*(undefined4 *)(this + 0x37c) = uVar3;
goto LAB_004c6b96;
}
}
if (this[0x5c] == (CSteamWorksGameStatsUploader)0x0) {
iVar2 = (**(code **)(*(int *)param_1 + 0x28))(param_1,"address",&DAT_00d539c2);
if (iVar2 == 0) {
V_strncpy((char *)(this + 0x5c),"No Server Address",0x104);
}
else {
uVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"port",0);
V_snprintf((char *)(this + 0x5c),0x104,"%s:%d",iVar2,uVar3);
}
}
if (this[0x264] == (CSteamWorksGameStatsUploader)0x0) {
pcVar1 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"hostname",&DAT_00d539c2);
if (pcVar1 == (char *)0x0) {
V_strncpy((char *)(this + 0x264),"No Host Name",0x104);
}
else {
V_strncpy((char *)(this + 0x264),pcVar1,0x104);
}
}
if (this[0x160] == (CSteamWorksGameStatsUploader)0x0) {
pcVar1 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"mapname",&DAT_00d539c2);
if (pcVar1 == (char *)0x0) {
V_strncpy((char *)(this + 0x160),"No Map Name",0x104);
}
else {
V_strncpy((char *)(this + 0x160),pcVar1,0x104);
}
}
goto LAB_004c6b96;
}
}
pcVar1 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"hostname",&DAT_00d539c2);
if (pcVar1 == (char *)0x0) {
V_strncpy((char *)(this + 0x264),"No Host Name",0x104);
}
else {
V_strncpy((char *)(this + 0x264),pcVar1,0x104);
}
LAB_004c6b96:
/* WARNING: Could not recover jumptable at 0x004c6ba8. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x44))();
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.