L L4D2node

CUtlPriorityQueue<SoundCommand_t*,CDefUtlPriorityQueueLessFunc<SoundCommand_t*>,CUtlMemory<SoundCommand_t*,int>>::RemoveAtHead

0x004c14c0 · 204 bytes · __thiscall

_ZN17CUtlPriorityQueueIP14SoundCommand_t28CDefUtlPriorityQueueLessFuncIS1_E10CUtlMemoryIS1_iEE12RemoveAtHeadEv

Decompiled

undefined (1 param)

/* CUtlPriorityQueue<SoundCommand_t*, CDefUtlPriorityQueueLessFunc<SoundCommand_t*>,
   CUtlMemory<SoundCommand_t*, int> >::RemoveAtHead() */

void __thiscall
CUtlPriorityQueue<SoundCommand_t*,CDefUtlPriorityQueueLessFunc<SoundCommand_t*>,CUtlMemory<SoundCommand_t*,int>>
::RemoveAtHead(CUtlPriorityQueue<SoundCommand_t*,CDefUtlPriorityQueueLessFunc<SoundCommand_t*>,CUtlMemory<SoundCommand_t*,int>>
               *this)

{
  int iVar1;
  undefined4 *puVar2;
  int iVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  char cVar7;
  int iVar8;
  
  CUtlVector<SoundCommand_t*,CUtlMemory<SoundCommand_t*,int>>::FastRemove
            ((CUtlVector<SoundCommand_t*,CUtlMemory<SoundCommand_t*,int>> *)this,0);
  iVar4 = *(int *)(this + 0xc);
  if ((iVar4 != 0) && (0 < iVar4 / 2)) {
    iVar8 = 0;
    do {
      iVar3 = iVar8 * 2 + 2;
      iVar1 = iVar8 * 2 + 1;
      iVar6 = iVar8;
      if ((iVar1 < iVar4) &&
         (cVar7 = (**(code **)(this + 0x14))(*(int *)this + iVar8 * 4,*(int *)this + iVar1 * 4),
         iVar6 = iVar1, cVar7 == '\0')) {
        iVar6 = iVar8;
      }
      if ((iVar3 < iVar4) &&
         (cVar7 = (**(code **)(this + 0x14))(*(int *)this + iVar6 * 4,*(int *)this + iVar3 * 4),
         cVar7 != '\0')) {
        iVar6 = iVar3;
      }
      if (iVar6 == iVar8) {
        return;
      }
      puVar2 = (undefined4 *)(*(int *)this + iVar8 * 4);
      uVar5 = *puVar2;
      *puVar2 = *(undefined4 *)(*(int *)this + iVar6 * 4);
      *(undefined4 *)(*(int *)this + iVar6 * 4) = uVar5;
      iVar8 = iVar6;
    } while (iVar6 < iVar4 / 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)