CEscapeRoute::GetPathIndexFromFlow
0x008ce880 · 97 bytes · __thiscall
_ZNK12CEscapeRoute20GetPathIndexFromFlowEfN13TerrorNavArea8FlowTypeE
Decompiled
undefined (3 params)
/* CEscapeRoute::GetPathIndexFromFlow(float, TerrorNavArea::FlowType) const */
int __thiscall CEscapeRoute::GetPathIndexFromFlow(CEscapeRoute *this,float param_1,int param_3)
{
int iVar1;
iVar1 = *(int *)(this + 0x1c40);
if (iVar1 != 0) {
if (param_1 <= 0.0) {
return iVar1 + -1;
}
if (*(float *)(this + param_3 * 4 + 0x2448) <= param_1) {
return 0;
}
iVar1 = iVar1 + -1;
if (0 < iVar1) {
if (param_1 < *(float *)(this + (param_3 + 0x910 + iVar1 * 2) * 4 + 8) ||
param_1 == *(float *)(this + (param_3 + 0x910 + iVar1 * 2) * 4 + 8)) {
return iVar1;
}
while (iVar1 = iVar1 + -1, iVar1 != 0) {
if (param_1 < *(float *)(this + iVar1 * 8 + param_3 * 4 + 0x2448) ||
param_1 == *(float *)(this + iVar1 * 8 + param_3 * 4 + 0x2448)) {
return iVar1;
}
}
}
}
return -1;
}
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.