L L4D2node

Checkpoint::GetAreaFarthestFrom

0x0086ad40 · 111 bytes · __thiscall

_ZNK10Checkpoint19GetAreaFarthestFromERK6Vector

Decompiled

undefined (2 params)

/* Checkpoint::GetAreaFarthestFrom(Vector const&) const */

CNavArea * __thiscall Checkpoint::GetAreaFarthestFrom(Checkpoint *this,Vector *param_1)

{
  CNavArea *this_00;
  int iVar1;
  longdouble lVar2;
  CNavArea *local_28;
  float local_24;
  
  if (*(int *)(this + 0x3c) < 1) {
    local_28 = (CNavArea *)0x0;
  }
  else {
    iVar1 = 0;
    local_24 = 0.0;
    local_28 = (CNavArea *)0x0;
    do {
      this_00 = *(CNavArea **)(*(int *)(this + 0x30) + iVar1 * 4);
      lVar2 = (longdouble)CNavArea::GetDistanceSquaredToPoint(this_00,param_1);
      if (local_24 < (float)lVar2) {
        local_28 = this_00;
        local_24 = (float)lVar2;
      }
      iVar1 = iVar1 + 1;
    } while (iVar1 < *(int *)(this + 0x3c));
  }
  return local_28;
}

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)