COverlayMgr::FadeOverlayFragmentGlobal
0x001cfa70 · 258 bytes · __thiscall
_ZN11COverlayMgr25FadeOverlayFragmentGlobalEP18moverlayfragment_t
Decompiled
undefined (2 params)
/* COverlayMgr::FadeOverlayFragmentGlobal(moverlayfragment_t*) */
undefined4 __thiscall
COverlayMgr::FadeOverlayFragmentGlobal(COverlayMgr *this,moverlayfragment_t *param_1)
{
int iVar1;
float fVar2;
float fVar3;
float fVar4;
float *pfVar5;
int iVar6;
int iVar7;
undefined4 uVar8;
float fVar9;
fVar4 = DAT_003a0048;
fVar3 = DAT_003a0044;
fVar2 = g_MainViewOrigin;
iVar1 = *(int *)(param_1 + 0x1c);
if (iVar1 < 1) {
uVar8 = 0;
}
else {
iVar6 = 0;
uVar8 = 0;
iVar7 = 0;
do {
while( true ) {
pfVar5 = (float *)(*(int *)(param_1 + 0x10) + iVar6);
fVar9 = (fVar3 - pfVar5[1]) * (fVar3 - pfVar5[1]) +
(fVar4 - pfVar5[2]) * (fVar4 - pfVar5[2]) + (fVar2 - *pfVar5) * (fVar2 - *pfVar5);
if (fVar9 < *(float *)(this + 0x74)) break;
if (fVar9 < *(float *)(this + 0x78) || fVar9 == *(float *)(this + 0x78)) {
pfVar5[0xc] = (float)((int)((1.0 - (fVar9 - *(float *)(this + 0x74)) *
*(float *)(this + 0x7c)) * 255.0 + 8388608.0) << 0x18 |
0xffffff);
goto LAB_001cfacc;
}
iVar7 = iVar7 + 1;
iVar6 = iVar6 + 0x34;
pfVar5[0xc] = 2.3509886e-38;
if (iVar7 == iVar1) {
return uVar8;
}
}
pfVar5[0xc] = -NAN;
LAB_001cfacc:
uVar8 = 1;
iVar7 = iVar7 + 1;
iVar6 = iVar6 + 0x34;
} while (iVar7 != iVar1);
}
return uVar8;
}
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.