L L4D2node

CNavArea::FinishMerge

0x006fd300 · 457 bytes · __thiscall

_ZN8CNavArea11FinishMergeEPS_

Decompiled

undefined (2 params)

/* CNavArea::FinishMerge(CNavArea*) */

void __thiscall CNavArea::FinishMerge(CNavArea *this,CNavArea *param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  float *pfVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  
  pfVar7 = *(float **)(this + 0xec);
  fVar1 = *pfVar7;
  *(float *)(this + 4) = fVar1;
  fVar2 = pfVar7[1];
  *(float *)(this + 8) = fVar2;
  fVar3 = pfVar7[2];
  pfVar7 = *(float **)(this + 0xf4);
  *(float *)(this + 0xc) = fVar3;
  fVar4 = *pfVar7;
  *(float *)(this + 0x10) = fVar4;
  fVar5 = pfVar7[1];
  *(float *)(this + 0x14) = fVar5;
  fVar6 = pfVar7[2];
  *(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 *)(*(int *)(this + 0xf0) + 8);
  *(undefined4 *)(this + 0x28) = *(undefined4 *)(*(int *)(this + 0xf8) + 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 ((0.05 <= ABS(*(float *)(this + 0x24) - *(float *)(this + 0x18))) ||
     (0.05 <= ABS(*(float *)(this + 0x28) - *(float *)(this + 0x18)))) {
    *(uint *)(this + 0x54) = *(uint *)(this + 0x54) & 0xdfffffff;
  }
  else {
    *(uint *)(this + 0x54) = *(uint *)(this + 0x54) | 0x20000000;
  }
  iVar8 = *(int *)(param_1 + 0xec);
  iVar10 = *(int *)(param_1 + 0xf0);
  iVar9 = iVar8;
  if (iVar8 != *(int *)(param_1 + 0xf8)) {
    do {
      for (; iVar8 != iVar10; iVar8 = *(int *)(iVar8 + 0x1c)) {
        *(CNavArea **)(iVar8 + 0x74) = this;
      }
      iVar8 = *(int *)(iVar9 + 0x20);
      iVar10 = *(int *)(iVar10 + 0x20);
      iVar9 = iVar8;
    } while (iVar8 != *(int *)(param_1 + 0xf8));
  }
  MergeAdjacentConnections(this,param_1);
  (**(code **)(*TheNavMesh + 0x70))(TheNavMesh,param_1);
                    /* WARNING: Could not recover jumptable at 0x006fd4ab. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(*TheNavMesh + 0x18))();
  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)