CGameEventTransmitter::TransmitGameEvent
0x00166af0 · 323 bytes · __thiscall
_ZN21CGameEventTransmitter17TransmitGameEventEP10IGameEvent
Decompiled
undefined (2 params)
/* CGameEventTransmitter::TransmitGameEvent(IGameEvent*) */
void __thiscall
CGameEventTransmitter::TransmitGameEvent(CGameEventTransmitter *this,IGameEvent *param_1)
{
char cVar1;
char *pcVar2;
undefined4 uVar3;
int in_GS_OFFSET;
bf_write local_438 [12];
int local_42c;
uchar local_420 [1024];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
cVar1 = netadr_s::IsValid((netadr_s *)this);
if (((cVar1 != '\0') && (param_1 != (IGameEvent *)0x0)) &&
(cVar1 = (**(code **)(*(int *)param_1 + 0x10))(param_1), cVar1 == '\0')) {
pcVar2 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
bf_write::bf_write(local_438);
bf_write::StartWriting(local_438,local_420,0x400,0,-1);
bf_write::WriteString(local_438,pcVar2);
cVar1 = (**(code **)(s_GameEventManager + 0x30))(&s_GameEventManager,param_1,local_438);
if (cVar1 == '\0') {
uVar3 = (**(code **)(*(int *)param_1 + 8))(param_1);
DevMsg("GameEventTransmitter: failed to serialize event \'%s\'.\n",uVar3);
}
else {
NET_SendPacket((INetChannel *)0x0,0,(netadr_s *)this,local_420,local_42c + 7 >> 3,
(bf_write *)0x0,false,0);
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.