L L4D2node

CUtlVector<TerrorNavArea::AreaBindInfo,CUtlMemoryConservative<TerrorNavArea::AreaBindInfo>>::Sort

0x009883e0 · 171 bytes · __thiscall

_ZN10CUtlVectorIN13TerrorNavArea12AreaBindInfoE22CUtlMemoryConservativeIS1_EE4SortEPFiPKS1_S6_E

Decompiled

undefined (2 params)

/* CUtlVector<TerrorNavArea::AreaBindInfo, CUtlMemoryConservative<TerrorNavArea::AreaBindInfo>
   >::Sort(int (*)(TerrorNavArea::AreaBindInfo const*, TerrorNavArea::AreaBindInfo const*)) */

void __thiscall
CUtlVector<TerrorNavArea::AreaBindInfo,CUtlMemoryConservative<TerrorNavArea::AreaBindInfo>>::Sort
          (CUtlVector<TerrorNavArea::AreaBindInfo,CUtlMemoryConservative<TerrorNavArea::AreaBindInfo>>
           *this,_func_int_AreaBindInfo_ptr_AreaBindInfo_ptr *param_1)

{
  undefined2 uVar1;
  size_t __nmemb;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined2 *puVar5;
  undefined2 *puVar6;
  int local_24;
  
  __nmemb = *(size_t *)(this + 8);
  if (1 < (int)__nmemb) {
    if (*(void **)this == (void *)0x0) {
      local_24 = __nmemb - 1;
      do {
        if (0 < local_24) {
          iVar4 = 1;
          do {
            while( true ) {
              iVar2 = iVar4 * 2;
              iVar3 = (*param_1)((AreaBindInfo *)(*(int *)this + iVar2 + -2),
                                 (AreaBindInfo *)(*(int *)this + iVar2));
              if (-1 < iVar3) break;
              iVar4 = iVar4 + 1;
              puVar5 = (undefined2 *)(iVar2 + *(int *)this);
              puVar6 = (undefined2 *)(iVar2 + -2 + *(int *)this);
              uVar1 = *puVar6;
              *puVar6 = *puVar5;
              *puVar5 = uVar1;
              if (local_24 < iVar4) goto LAB_00988483;
            }
            iVar4 = iVar4 + 1;
          } while (iVar4 <= local_24);
        }
LAB_00988483:
        local_24 = local_24 + -1;
        if (local_24 == -1) {
          return;
        }
      } while( true );
    }
    qsort(*(void **)this,__nmemb,2,(__compar_fn_t)param_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)