L L4D2node

CNavNode::GetGroundHeightAboveNode

0x007460b0 · 86 bytes · __thiscall

_ZNK8CNavNode24GetGroundHeightAboveNodeE13NavCornerType

Decompiled

undefined (2 params)

/* CNavNode::GetGroundHeightAboveNode(NavCornerType) const */

longdouble __thiscall CNavNode::GetGroundHeightAboveNode(CNavNode *this,uint param_2)

{
  float fVar1;
  
  if (3 < param_2) {
    fVar1 = *(float *)(this + 0x80);
    if (fVar1 <= 0.0) {
      fVar1 = 0.0;
    }
    if (fVar1 <= *(float *)(this + 0x84)) {
      fVar1 = *(float *)(this + 0x84);
    }
    if (fVar1 <= *(float *)(this + 0x88)) {
      fVar1 = *(float *)(this + 0x88);
    }
    if (fVar1 <= *(float *)(this + 0x8c)) {
      fVar1 = *(float *)(this + 0x8c);
    }
    return (longdouble)fVar1;
  }
  return (longdouble)*(float *)(this + param_2 * 4 + 0x80);
}

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)