L L4D2node

Subdivider::SubdivideY

0x007313c0 · 438 bytes · __thiscall

_ZN10Subdivider10SubdivideYEP8CNavAreabbi

Decompiled

undefined (5 params)

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

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

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