L L4D2node

CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>::RemoveAtHead

0x00713a70 · 210 bytes · __thiscall

_ZN17CUtlPriorityQueueI14OpenListInfo_t17COpenListLessFunc23CUtlMemoryFixedGrowableIS0_Lj4096EiEE12RemoveAtHeadEv

Decompiled

undefined (1 param)

/* CUtlPriorityQueue<OpenListInfo_t, COpenListLessFunc, CUtlMemoryFixedGrowable<OpenListInfo_t,
   4096u, int> >::RemoveAtHead() */

void __thiscall
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::RemoveAtHead(CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
               *this)

{
  int iVar1;
  int iVar2;
  float *pfVar3;
  float fVar4;
  undefined4 uVar5;
  undefined4 *puVar6;
  undefined4 uVar7;
  undefined4 uVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  
  iVar11 = *(int *)(this + 0x8010);
  if (0 < iVar11) {
    iVar10 = iVar11 + -1;
    iVar11 = 0;
    if (iVar10 != 0) {
      puVar6 = *(undefined4 **)this;
      *puVar6 = puVar6[iVar10 * 2];
      puVar6[1] = (puVar6 + iVar10 * 2)[1];
      iVar11 = *(int *)(this + 0x8010) + -1;
    }
    *(int *)(this + 0x8010) = iVar11;
  }
  if ((iVar11 != 0) && (0 < iVar11 / 2)) {
    iVar10 = 0;
    do {
      iVar2 = iVar10 * 2 + 2;
      iVar1 = iVar10 * 2 + 1;
      iVar9 = iVar10;
      if ((iVar1 < iVar11) &&
         (fVar4 = *(float *)(*(int *)this + 4 + iVar10 * 8),
         pfVar3 = (float *)(*(int *)this + 4 + iVar1 * 8), iVar9 = iVar1,
         fVar4 < *pfVar3 || fVar4 == *pfVar3)) {
        iVar9 = iVar10;
      }
      if ((iVar2 < iVar11) &&
         (fVar4 = *(float *)(*(int *)this + 4 + iVar9 * 8),
         pfVar3 = (float *)(*(int *)this + 4 + iVar2 * 8), *pfVar3 <= fVar4 && fVar4 != *pfVar3)) {
        iVar9 = iVar2;
      }
      if (iVar9 == iVar10) {
        return;
      }
      iVar1 = *(int *)this;
      puVar6 = (undefined4 *)(iVar1 + iVar10 * 8);
      uVar7 = *(undefined4 *)(iVar1 + iVar9 * 8);
      uVar5 = puVar6[1];
      uVar8 = *puVar6;
      puVar6[1] = *(undefined4 *)(iVar1 + 4 + iVar9 * 8);
      *puVar6 = uVar7;
      puVar6 = (undefined4 *)(*(int *)this + iVar9 * 8);
      *puVar6 = uVar8;
      puVar6[1] = uVar5;
      iVar10 = iVar9;
    } while (iVar9 < iVar11 / 2);
  }
  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)