PrintChangeTracks
0x001ed610 · 518 bytes · unknown
_Z17PrintChangeTracksv
Decompiled
undefined (0 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* PrintChangeTracks() */
void PrintChangeTracks(void)
{
int *piVar1;
undefined4 *puVar2;
double dVar3;
uint uVar4;
int iVar5;
int iVar6;
bool bVar7;
longdouble lVar8;
undefined8 local_34;
undefined8 local_2c;
ConMsg("\n\n");
ConMsg("------------------------------------------------------------------------\n");
ConMsg("CalcDelta MS / %% time / Encode MS / # Changed / # Unchanged / Class Name\n");
ConMsg("------------------------------------------------------------------------\n");
if (DAT_003b230c == -1) {
local_2c = 0.0;
local_34 = 0.0;
}
else {
local_34._0_4_ = 0;
local_34._4_4_ = 0;
local_2c._0_4_ = 0;
local_2c._4_4_ = 0;
iVar5 = DAT_003b230c;
do {
piVar1 = (int *)(g_Tracks + iVar5 * 0xc);
iVar6 = *piVar1;
iVar5 = piVar1[2];
bVar7 = CARRY4((uint)local_34,*(uint *)(iVar6 + 0xc));
local_34._0_4_ = (uint)local_34 + *(uint *)(iVar6 + 0xc);
local_34._4_4_ = local_34._4_4_ + *(int *)(iVar6 + 0x10) + (uint)bVar7;
uVar4 = (uint)local_2c + *(uint *)(iVar6 + 0x14);
iVar6 = local_2c._4_4_ + *(int *)(iVar6 + 0x18) +
(uint)CARRY4((uint)local_2c,*(uint *)(iVar6 + 0x14));
local_2c._0_4_ = uVar4;
local_2c._4_4_ = iVar6;
} while (iVar5 != -1);
local_2c = (double)CONCAT44(local_34._4_4_,(uint)local_34);
bVar7 = local_34._4_4_ < 0;
local_34 = (double)(longlong)local_2c;
iVar5 = DAT_003b230c;
if (bVar7) {
local_34 = local_34 + 1.8446744073709552e+19;
}
do {
puVar2 = *(undefined4 **)(g_Tracks + iVar5 * 0xc);
lVar8 = (longdouble)*(longlong *)(puVar2 + 3);
if ((int)puVar2[4] < 0) {
lVar8 = _DAT_002adb60 + lVar8;
}
dVar3 = (double)*(longlong *)(puVar2 + 5);
if ((int)puVar2[6] < 0) {
dVar3 = dVar3 + 1.8446744073709552e+19;
}
ConMsg("%6.2fms %5.2f %6.2fms %4d %4d %s\n",
(double)lVar8 * _g_ClockSpeedMillisecondsMultiplier,
((double)lVar8 * _g_ClockSpeedMillisecondsMultiplier * 100.0) /
(_g_ClockSpeedMillisecondsMultiplier * local_34),
dVar3 * _g_ClockSpeedMillisecondsMultiplier,puVar2[1],puVar2[2],*puVar2);
iVar5 = *(int *)(g_Tracks + 8 + iVar5 * 0xc);
} while (iVar5 != -1);
local_2c = (double)CONCAT44(iVar6,uVar4);
if (iVar6 < 0) {
local_2c = local_2c + 1.8446744073709552e+19;
}
}
ConMsg("\n\n");
ConMsg("Total CalcDelta MS: %.2f\n\n",local_34 * _g_ClockSpeedMillisecondsMultiplier);
ConMsg("Total Encode MS: %.2f\n\n",local_2c * _g_ClockSpeedMillisecondsMultiplier);
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.