CBlackBox::Get
0x00113710 · 286 bytes · __thiscall
_ZN9CBlackBox3GetEij
Decompiled
undefined (3 params)
/* CBlackBox::Get(int, unsigned int) */
undefined4 __thiscall CBlackBox::Get(CBlackBox *this,int param_1,uint param_2)
{
double dVar1;
double *pdVar2;
undefined4 uVar3;
int iVar4;
uVar3 = 0;
if ((uint)param_1 < 3) {
pdVar2 = *(double **)(*(int *)(this + param_1 * 0x14 + 4) + param_2 * 4);
if (const*()::buf == '\0') {
iVar4 = __cxa_guard_acquire(&const*()::buf);
if (iVar4 != 0) {
_ZZNK15CBlackBoxRecordcvPKcEvE3buf._0_4_ = &PTR_InitQuietTruncation_002a9a90;
_ZZNK15CBlackBoxRecordcvPKcEvE3buf[4] = 1;
_ZZNK15CBlackBoxRecordcvPKcEvE3buf[5] = 0;
_ZZNK15CBlackBoxRecordcvPKcEvE3buf._1048_4_ = 0;
__cxa_guard_release(&const*()::buf);
}
}
dVar1 = *pdVar2;
iVar4 = (int)(dVar1 * 0.016666666666666666) % 0x3c;
CFmtStrN<1040>::sprintf
((CFmtStrN<1040> *)_ZZNK15CBlackBoxRecordcvPKcEvE3buf,"[%02d:%02d:%02.3f]: %s",
(int)(dVar1 * 0.0002777777777777778),iVar4,
(double)(float)(dVar1 - (double)(((int)(dVar1 * 0.0002777777777777778) * 0x3c + iVar4
) * 0x3c)),*(undefined4 *)(pdVar2 + 1));
uVar3 = 0x355665;
}
return uVar3;
}
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.