SurvivorTeamSituation::GetTimeSinceAnyFriendVisible
0x00965340 · 250 bytes · __thiscall
_ZNK21SurvivorTeamSituation28GetTimeSinceAnyFriendVisibleEv
Decompiled
undefined (1 param)
/* SurvivorTeamSituation::GetTimeSinceAnyFriendVisible() const */
longdouble __thiscall
SurvivorTeamSituation::GetTimeSinceAnyFriendVisible(SurvivorTeamSituation *this)
{
uint uVar1;
undefined *puVar2;
SurvivorTeamSituation *pSVar3;
int iVar4;
longdouble lVar5;
float fVar6;
float fVar7;
if (*(int *)(this + 0xd6f8) < 1) {
fVar7 = (float)0x4e6e6b28;
}
else {
iVar4 = 0;
fVar7 = (float)0x4e6e6b28;
pSVar3 = this + 55000;
LAB_00965382:
do {
uVar1 = *(uint *)(pSVar3 + -4);
if ((((uVar1 != 0xffffffff) &&
(puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar2 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar2 + 4) != 0)) {
fVar6 = 99999.9;
if (0.0 < *(float *)(pSVar3 + 4)) {
lVar5 = (longdouble)IntervalTimer::Now();
fVar6 = (float)lVar5 - *(float *)(pSVar3 + 4);
}
if (fVar6 < fVar7) {
fVar7 = 99999.9;
if (0.0 < *(float *)(pSVar3 + 4)) {
iVar4 = iVar4 + 1;
lVar5 = (longdouble)IntervalTimer::Now();
fVar7 = (float)lVar5 - *(float *)(pSVar3 + 4);
pSVar3 = pSVar3 + 0xc;
if (*(int *)(this + 0xd6f8) <= iVar4) break;
goto LAB_00965382;
}
}
}
iVar4 = iVar4 + 1;
pSVar3 = pSVar3 + 0xc;
} while (iVar4 < *(int *)(this + 0xd6f8));
}
return (longdouble)fVar7;
}
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.