L L4D2node

CNavArea::GetZ

0x006fc410 · 169 bytes · __thiscall

_ZNK8CNavArea4GetZEff

Decompiled

undefined (3 params)

/* CNavArea::GetZ(float, float) const */

longdouble __thiscall CNavArea::GetZ(CNavArea *this,float param_1,float param_2)

{
  float fVar1;
  float fVar2;
  float fVar3;
  
  if ((*(float *)(this + 0x1c) != 0.0) && (*(float *)(this + 0x20) != 0.0)) {
    fVar2 = (param_1 - *(float *)(this + 4)) * *(float *)(this + 0x1c);
    fVar3 = (param_2 - *(float *)(this + 8)) * *(float *)(this + 0x20);
    if (fVar2 <= 0.0) {
      fVar2 = 0.0;
    }
    if (fVar3 <= 0.0) {
      fVar3 = 0.0;
    }
    if (1.0 <= fVar2) {
      fVar2 = 1.0;
    }
    if (1.0 <= fVar3) {
      fVar3 = 1.0;
    }
    fVar1 = (*(float *)(this + 0x24) - *(float *)(this + 0xc)) * fVar2 + *(float *)(this + 0xc);
    return (longdouble)
           ((((*(float *)(this + 0x18) - *(float *)(this + 0x28)) * fVar2 + *(float *)(this + 0x28))
            - fVar1) * fVar3 + fVar1);
  }
  return (longdouble)*(float *)(this + 0x24);
}

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)