CGameEventManager::ConPrintEvent
0x00161de0 · 345 bytes · __thiscall
_ZN17CGameEventManager13ConPrintEventEP10IGameEvent
Decompiled
undefined (2 params)
/* CGameEventManager::ConPrintEvent(IGameEvent*) */
void __thiscall CGameEventManager::ConPrintEvent(CGameEventManager *this,IGameEvent *param_1)
{
int iVar1;
KeyValues *this_00;
undefined4 uVar2;
undefined4 uVar3;
longdouble lVar4;
iVar1 = GetEventDescriptor(this,param_1);
if (iVar1 != 0) {
for (this_00 = (KeyValues *)KeyValues::GetFirstSubKey(*(KeyValues **)(iVar1 + 8));
this_00 != (KeyValues *)0x0; this_00 = (KeyValues *)KeyValues::GetNextKey(this_00)) {
while( true ) {
uVar2 = KeyValues::GetName(this_00);
iVar1 = KeyValues::GetInt(this_00,(char *)0x0,0);
if (iVar1 != 1) break;
uVar3 = (**(code **)(*(int *)param_1 + 0x28))(param_1,uVar2,&DAT_002c79d4);
ConMsg("- \"%s\" = \"%s\"\n",uVar2,uVar3);
this_00 = (KeyValues *)KeyValues::GetNextKey(this_00);
if (this_00 == (KeyValues *)0x0) {
return;
}
}
if (iVar1 == 2) {
lVar4 = (longdouble)(**(code **)(*(int *)param_1 + 0x24))(param_1,uVar2,0);
ConMsg("- \"%s\" = \"%.2f\"\n",uVar2,(double)(float)lVar4);
}
else if (iVar1 == 0) {
uVar3 = (**(code **)(*(int *)param_1 + 0x28))(param_1,uVar2,&DAT_002c79d4);
ConMsg("- \"%s\" = \"%s\" (local)\n",uVar2,uVar3);
}
else {
uVar3 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,uVar2,0);
ConMsg("- \"%s\" = \"%i\"\n",uVar2,uVar3);
}
}
}
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.