L L4D2node

splitX

0x00722180 · 201 bytes · __regparm3

_ZL6splitXP8CNavArea

Decompiled

undefined (1 param)

/* splitX(CNavArea*) */

void __regparm3 splitX(CNavArea *param_1)

{
  float fVar1;
  char cVar2;
  longdouble lVar3;
  CNavArea *local_14;
  CNavArea *local_10 [2];
  
  cVar2 = CNavArea::IsRoughlySquare();
  if (cVar2 == '\0') {
    lVar3 = (longdouble)
            CNavMesh::SnapToGrid
                      (TheNavMesh,
                       (*(float *)(param_1 + 0x10) - *(float *)(param_1 + 4)) * 0.5 +
                       *(float *)(param_1 + 4),false);
    fVar1 = (float)lVar3;
    if ((0.1 <= ABS(fVar1 - *(float *)(param_1 + 4))) &&
       (0.1 <= ABS(fVar1 - *(float *)(param_1 + 0x10)))) {
      cVar2 = CNavArea::SplitEdit(param_1,false,fVar1,&local_14,local_10);
      if (cVar2 != '\0') {
        splitX(local_14);
        splitX(local_10[0]);
      }
    }
  }
  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)