L L4D2node

CNavArea::ComputeMinMaxCornerZ

0x006fa980 · 151 bytes · __thiscall

_ZN8CNavArea20ComputeMinMaxCornerZEv

Decompiled

undefined (1 param)

/* CNavArea::ComputeMinMaxCornerZ() */

void __thiscall CNavArea::ComputeMinMaxCornerZ(CNavArea *this)

{
  byte bVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  
  fVar3 = *(float *)(this + 0x24);
  fVar4 = *(float *)(this + 0xc);
  bVar1 = (byte)this[0x7c] & 0xf;
  this[0x7c] = (CNavArea)(bVar1 | 0x50);
  if (fVar4 <= fVar3) {
    fVar2 = fVar3;
    if (fVar4 < fVar3) {
      this[0x7c] = (CNavArea)(bVar1 | 0x10);
      fVar3 = fVar4;
    }
  }
  else {
    this[0x7c] = (CNavArea)(bVar1 | 0x40);
    fVar2 = fVar4;
  }
  fVar4 = *(float *)(this + 0x18);
  if (fVar4 <= fVar2) {
    if (fVar4 < fVar3) {
      fVar5 = *(float *)(this + 0x28);
      this[0x7c] = (CNavArea)((byte)this[0x7c] & 0x3f | 0x80);
      if (fVar2 < fVar5) goto LAB_006fa9ff;
      goto LAB_006fa9cc;
    }
  }
  else {
    this[0x7c] = (CNavArea)((byte)this[0x7c] & 0xcf | 0x20);
    fVar2 = fVar4;
  }
  fVar5 = *(float *)(this + 0x28);
  fVar4 = fVar3;
  if (fVar2 < fVar5) {
LAB_006fa9ff:
    this[0x7c] = (CNavArea)((byte)this[0x7c] | 0x30);
    return;
  }
LAB_006fa9cc:
  if (fVar5 < fVar4) {
    this[0x7c] = (CNavArea)((byte)this[0x7c] | 0xc0);
  }
  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)