L L4D2node

Subdivider::SubdivideX

0x00731590 · 443 bytes · __thiscall

_ZN10Subdivider10SubdivideXEP8CNavAreabbi

Decompiled

undefined (5 params)

/* Subdivider::SubdivideX(CNavArea*, bool, bool, int) */

void __thiscall
Subdivider::SubdivideX(Subdivider *this,CNavArea *param_1,bool param_2,bool param_3,int param_4)

{
  char cVar1;
  longdouble lVar2;
  float fVar3;
  CNavArea *local_14;
  CNavArea *local_10 [2];
  
  if ((param_2) && (0 < param_4)) {
    fVar3 = (*(float *)(param_1 + 0x10) - *(float *)(param_1 + 4)) * 0.5;
    if (25.0 <= fVar3) {
      lVar2 = (longdouble)CNavMesh::SnapToGrid(TheNavMesh,fVar3 + *(float *)(param_1 + 4),false);
      cVar1 = CNavArea::SplitEdit(param_1,false,(float)lVar2,&local_14,local_10);
      if (cVar1 != '\0') {
        SubdivideY(this,local_14,true,param_3,param_4);
        SubdivideY(this,local_10[0],true,param_3,param_4);
      }
    }
    else if (param_3) {
      fVar3 = (*(float *)(param_1 + 0x14) - *(float *)(param_1 + 8)) * 0.5;
      if (25.0 <= fVar3) {
        lVar2 = (longdouble)CNavMesh::SnapToGrid(TheNavMesh,fVar3 + *(float *)(param_1 + 8),false);
        cVar1 = CNavArea::SplitEdit(param_1,true,(float)lVar2,&local_14,local_10);
        if (cVar1 != '\0') {
          SubdivideX(this,local_14,false,true,param_4 + -1);
          SubdivideX(this,local_10[0],false,true,param_4 + -1);
        }
      }
    }
  }
  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)