CL4DGameStats::UpdateValidGamePlayCheck
0x008e0800 · 295 bytes · __thiscall
_ZN13CL4DGameStats24UpdateValidGamePlayCheckEv
Decompiled
undefined (1 param)
/* CL4DGameStats::UpdateValidGamePlayCheck() */
void __thiscall CL4DGameStats::UpdateValidGamePlayCheck(CL4DGameStats *this)
{
int *piVar1;
char cVar2;
byte bVar3;
int iVar4;
int iVar5;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
int local_30 [8];
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
local_40 = 2;
local_3c = 3;
local_38 = 3;
local_34 = 9;
/* try { // try from 008e0851 to 008e08d6 has its CatchHandler @ 008e092c */
ForEachTerrorPlayer<PlayerCollector>((PlayerCollector *)&local_40);
if (local_30[3] < 1) {
iVar5 = 0;
}
else {
iVar4 = 0;
iVar5 = 0;
do {
piVar1 = *(int **)(local_30[0] + iVar4 * 4);
cVar2 = (**(code **)(*piVar1 + 0x778))(piVar1);
iVar5 = iVar5 + (uint)(cVar2 == '\0');
iVar4 = iVar4 + 1;
} while (iVar4 < local_30[3]);
}
iVar4 = *(int *)(this + 0x78);
if ((((90.0 <= (double)iVar4) && (0x1d < *(int *)(this + 0x3a8))) && (0 < iVar5)) ||
(*(int *)(l4d_stats_nogameplaycheck._28_4_ + 0x30) != 0)) {
this[0x3ac] = (CL4DGameStats)0x1;
}
if (engine != (int *)0x0) {
bVar3 = (**(code **)(*engine + 8))(engine);
this[0x3ac] = (CL4DGameStats)((byte)this[0x3ac] | bVar3);
bVar3 = (**(code **)(*engine + 0x1f8))(engine);
this[0x3ac] = (CL4DGameStats)((byte)this[0x3ac] | bVar3);
iVar4 = *(int *)(this + 0x78);
}
if (iVar4 == 0) {
this[0x3ac] = (CL4DGameStats)0x0;
}
local_30[3] = 0;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
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.