Script_GetFlowPercentForPosition
0x00b42750 · 176 bytes · __cdecl
_ZL32Script_GetFlowPercentForPosition6Vectorb
Decompiled
undefined (2 params)
/* Script_GetFlowPercentForPosition(Vector, bool) */
longdouble Script_GetFlowPercentForPosition(void)
{
float fVar1;
undefined4 uVar2;
int iVar3;
float fVar4;
undefined4 in_stack_00000010;
uVar2 = in_stack_00000010;
iVar3 = CNavMesh::GetNearestNavArea
(TheNavMesh,(Vector *)&stack0x00000004,false,10000.0,false,true,false);
fVar4 = 0.0;
if (iVar3 != 0) {
fVar4 = 0.0;
fVar1 = *(float *)(TheNavMesh + 0x5f4);
if ((char)uVar2 == '\0') {
if (0.0 < fVar1) {
return (longdouble)((*(float *)(iVar3 + 0x154) * 100.0) / fVar1);
}
}
else if (0.0 < fVar1) {
fVar4 = (*(float *)(iVar3 + 0x158) * 100.0) / fVar1;
}
}
return (longdouble)fVar4;
}
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.