L L4D2node

current_flow_distance_f

0x00971d50 · 206 bytes · __cdecl

_Z23current_flow_distance_fRK8CCommand

Decompiled

undefined (1 param)

/* current_flow_distance_f(CCommand const&) */

void current_flow_distance_f(CCommand *param_1)

{
  int iVar1;
  CTerrorPlayer *pCVar2;
  longdouble lVar3;
  longdouble lVar4;
  double dVar5;
  
  iVar1 = UTIL_GetCommandClient();
  if (iVar1 != 0) {
    pCVar2 = (CTerrorPlayer *)
             __dynamic_cast(iVar1,&CBasePlayer::typeinfo,&CTerrorPlayer::typeinfo,0);
    if (pCVar2 != (CTerrorPlayer *)0x0) {
      lVar3 = (longdouble)CTerrorPlayer::GetFlowDistance(pCVar2,0);
      if (*(float *)(TheNavMesh + 0x5f4) <= 0.0) {
        dVar5 = 0.0;
      }
      else {
        lVar4 = (longdouble)CTerrorPlayer::GetFlowDistance(pCVar2,0);
        dVar5 = (double)(((float)lVar4 * 100.0) / *(float *)(TheNavMesh + 0x5f4));
      }
      Msg("Current flow distance: %f / %f %% \n",(double)(float)lVar3,dVar5);
    }
  }
  return;
}

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)