L L4D2node

CNavArea::Build

0x006fabe0 · 327 bytes · __thiscall

_ZN8CNavArea5BuildERK6VectorS2_S2_S2_

Decompiled

undefined (5 params)

/* CNavArea::Build(Vector const&, Vector const&, Vector const&, Vector const&) */

void __thiscall
CNavArea::Build(CNavArea *this,Vector *param_1,Vector *param_2,Vector *param_3,Vector *param_4)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  
  fVar1 = *(float *)param_1;
  *(float *)(this + 4) = fVar1;
  fVar2 = *(float *)(param_1 + 4);
  *(float *)(this + 8) = fVar2;
  fVar3 = *(float *)(param_1 + 8);
  *(float *)(this + 0xc) = fVar3;
  fVar4 = *(float *)param_3;
  *(float *)(this + 0x10) = fVar4;
  fVar5 = *(float *)(param_3 + 4);
  *(float *)(this + 0x14) = fVar5;
  fVar6 = *(float *)(param_3 + 8);
  *(float *)(this + 0x18) = fVar6;
  *(float *)(this + 0x2c) = (fVar4 + fVar1) * 0.5;
  *(float *)(this + 0x34) = (fVar3 + fVar6) * 0.5;
  *(float *)(this + 0x30) = (fVar5 + fVar2) * 0.5;
  *(undefined4 *)(this + 0x24) = *(undefined4 *)(param_2 + 8);
  *(undefined4 *)(this + 0x28) = *(undefined4 *)(param_4 + 8);
  if ((fVar4 - fVar1 <= 0.0) || (fVar5 - fVar2 <= 0.0)) {
    *(undefined4 *)(this + 0x20) = 0;
    *(undefined4 *)(this + 0x1c) = 0;
  }
  else {
    *(float *)(this + 0x1c) = 1.0 / (fVar4 - fVar1);
    *(float *)(this + 0x20) = 1.0 / (fVar5 - fVar2);
  }
  ComputeMinMaxCornerZ(this);
  if ((ABS(*(float *)(this + 0x24) - *(float *)(this + 0x18)) < 0.05) &&
     (ABS(*(float *)(this + 0x28) - *(float *)(this + 0x18)) < 0.05)) {
    *(uint *)(this + 0x54) = *(uint *)(this + 0x54) | 0x20000000;
    return;
  }
  *(uint *)(this + 0x54) = *(uint *)(this + 0x54) & 0xdfffffff;
  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)