L L4D2node

CUtlVector<CPassengerSeatTransition,CUtlMemory<CPassengerSeatTransition,int>>::Sort

0x00b3d120 · 207 bytes · __thiscall

_ZN10CUtlVectorI24CPassengerSeatTransition10CUtlMemoryIS0_iEE4SortEPFiPKS0_S5_E

Decompiled

undefined (2 params)

/* CUtlVector<CPassengerSeatTransition, CUtlMemory<CPassengerSeatTransition, int> >::Sort(int
   (*)(CPassengerSeatTransition const*, CPassengerSeatTransition const*)) */

void __thiscall
CUtlVector<CPassengerSeatTransition,CUtlMemory<CPassengerSeatTransition,int>>::Sort
          (CUtlVector<CPassengerSeatTransition,CUtlMemory<CPassengerSeatTransition,int>> *this,
          _func_int_CPassengerSeatTransition_ptr_CPassengerSeatTransition_ptr *param_1)

{
  int iVar1;
  size_t __nmemb;
  undefined4 uVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  int iVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  int local_28;
  int local_20;
  
  __nmemb = *(size_t *)(this + 0xc);
  if (1 < (int)__nmemb) {
    if (*(void **)this == (void *)0x0) {
      local_28 = __nmemb - 1;
      do {
        if (0 < local_28) {
          local_20 = 1;
          do {
            while( true ) {
              iVar1 = local_20 * 8;
              iVar5 = (*param_1)((CPassengerSeatTransition *)(*(int *)this + iVar1 + -8),
                                 (CPassengerSeatTransition *)(*(int *)this + iVar1));
              if (-1 < iVar5) break;
              local_20 = local_20 + 1;
              puVar7 = (undefined4 *)(iVar1 + -8 + *(int *)this);
              puVar6 = (undefined4 *)(iVar1 + *(int *)this);
              uVar2 = *puVar7;
              uVar3 = puVar7[1];
              uVar4 = puVar6[1];
              *puVar7 = *puVar6;
              puVar7[1] = uVar4;
              puVar6[1] = uVar3;
              *puVar6 = uVar2;
              if (local_28 < local_20) goto LAB_00b3d1e0;
            }
            local_20 = local_20 + 1;
          } while (local_20 <= local_28);
        }
LAB_00b3d1e0:
        local_28 = local_28 + -1;
        if (local_28 == -1) {
          return;
        }
      } while( true );
    }
    qsort(*(void **)this,__nmemb,8,(__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)