L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)