DTI_Flush
0x0014ad70 · 472 bytes · unknown
_Z9DTI_Flushv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* DTI_Flush() */
void DTI_Flush(void)
{
int iVar1;
CUtlString *this;
int iVar2;
code *pcVar3;
undefined4 uVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
undefined4 *puVar9;
CUtlString *this_00;
undefined4 uVar10;
undefined4 uVar11;
int iVar12;
int iVar13;
if (g_bDTIEnabled == '\0') {
return;
}
iVar8 = (**(code **)(g_pFileSystem[1] + 8))(g_pFileSystem + 1,g_pDTIFilename,&DAT_002a5dab,0);
if (iVar8 != 0) {
(**(code **)(*g_pFileSystem + 100))
(g_pFileSystem,iVar8,
"Class,Prop,Decode Count,Total Bits,Avg Bits,Total Index Bits,Avg Index Bits,Flat prop index,=SUM(D:D)\n"
);
iVar12 = 2;
iVar13 = g_DTIRecvTables;
iVar7 = DAT_0039f48c;
while (iVar7 != -1) {
puVar9 = (undefined4 *)(iVar7 * 0xc + iVar13);
this = (CUtlString *)*puVar9;
if ((this[0x24] != (CUtlString)0x0) && (0 < *(int *)(this + 0x1c))) {
iVar13 = 0;
do {
while( true ) {
this_00 = (CUtlString *)(iVar13 * 0x20 + *(int *)(this + 0x10));
iVar2 = *(int *)(this_00 + 0x10);
if (iVar2 == 0) break;
iVar13 = iVar13 + 1;
pcVar3 = *(code **)(*g_pFileSystem + 100);
iVar1 = iVar12 + 1;
uVar4 = *(undefined4 *)(this_00 + 0x1c);
iVar5 = *(int *)(this_00 + 0x18);
iVar6 = *(int *)(this_00 + 0x14);
uVar10 = CUtlString::Get(this_00);
uVar11 = CUtlString::Get(this);
(*pcVar3)(g_pFileSystem,iVar8,"%s,%s,%d,%d,%.3f,%d,%.3f,%d,=D%d/I$1\n",uVar11,uVar10,
iVar2,iVar6,(double)((float)iVar6 / (float)iVar2),iVar5,
(double)((float)iVar5 / (float)iVar2),uVar4,iVar12);
iVar12 = iVar1;
if (*(int *)(this + 0x1c) <= iVar13) goto LAB_0014af03;
}
iVar13 = iVar13 + 1;
} while (iVar13 < *(int *)(this + 0x1c));
LAB_0014af03:
puVar9 = (undefined4 *)(iVar7 * 0xc + g_DTIRecvTables);
iVar13 = g_DTIRecvTables;
}
iVar7 = puVar9[2];
}
(**(code **)(g_pFileSystem[1] + 0xc))(g_pFileSystem + 1,iVar8);
Msg("DTI: wrote client stats into %s.\n",g_pDTIFilename);
}
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.