CNavArea::GetLightIntensity
0x006fffc0 · 224 bytes · __thiscall
_ZNK8CNavArea17GetLightIntensityERK6Vector
Decompiled
undefined (2 params)
/* CNavArea::GetLightIntensity(Vector const&) const */
longdouble __thiscall CNavArea::GetLightIntensity(CNavArea *this,Vector *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
fVar1 = *(float *)param_1;
if (*(float *)(this + 0x10) < fVar1) {
fVar5 = *(float *)(param_1 + 4);
fVar4 = 0.0;
fVar3 = *(float *)(this + 0x14);
fVar1 = 1.0;
fVar2 = 1.0;
if (fVar3 < fVar5) goto LAB_007000a1;
}
else {
fVar2 = *(float *)(this + 4);
fVar3 = *(float *)(this + 0x14);
if (fVar1 <= fVar2) {
fVar1 = fVar2;
}
fVar5 = *(float *)(param_1 + 4);
fVar2 = (fVar1 - fVar2) / (*(float *)(this + 0x10) - fVar2);
fVar4 = 1.0 - fVar2;
fVar1 = fVar2;
if (fVar3 < fVar5) {
LAB_007000a1:
fVar3 = 1.0;
fVar5 = 0.0;
goto LAB_00700031;
}
}
fVar2 = *(float *)(this + 8);
if (fVar5 <= fVar2) {
fVar5 = fVar2;
}
fVar3 = (fVar5 - fVar2) / (fVar3 - fVar2);
fVar5 = 1.0 - fVar3;
fVar2 = fVar1;
LAB_00700031:
return (longdouble)
((*(float *)(this + 0xe4) * fVar2 + *(float *)(this + 0xe8) * fVar4) * fVar3 +
(fVar2 * *(float *)(this + 0xe0) + fVar4 * *(float *)(this + 0xdc)) * fVar5);
}
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.