L L4D2node

CUtlPriorityQueue<CPhysSaveRestoreBlockHandler::QueuedItem_t,CDefUtlPriorityQueueLessFunc<CPhysSaveRestoreBlockHandler::QueuedItem_t>,CUtlMemory<CPhysSaveRestoreBlockHandler::QueuedItem_t,int>>::RemoveAtHead

0x00481d50 · 364 bytes · __thiscall

_ZN17CUtlPriorityQueueIN28CPhysSaveRestoreBlockHandler12QueuedItem_tE28CDefUtlPriorityQueueLessFuncIS1_E10CUtlMemoryIS1_iEE12RemoveAtHeadEv

Decompiled

undefined (1 param)

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

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

{
  int iVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  char cVar5;
  int iVar6;
  int iVar7;
  undefined4 *puVar8;
  
  iVar6 = *(int *)(this + 0xc);
  if (0 < iVar6) {
    iVar7 = iVar6 + -1;
    iVar6 = 0;
    if (iVar7 != 0) {
      puVar3 = *(undefined4 **)this;
      puVar8 = puVar3 + iVar7 * 0xe;
      *puVar3 = *puVar8;
      puVar3[1] = puVar8[1];
      puVar3[2] = puVar8[2];
      puVar3[3] = puVar8[3];
      puVar3[4] = puVar8[4];
      puVar3[5] = puVar8[5];
      puVar3[6] = puVar8[6];
      puVar3[7] = puVar8[7];
      puVar3[8] = puVar8[8];
      puVar3[9] = puVar8[9];
      puVar3[10] = puVar8[10];
      puVar3[0xb] = puVar8[0xb];
      puVar3[0xc] = puVar8[0xc];
      puVar3[0xd] = puVar8[0xd];
      iVar6 = *(int *)(this + 0xc) + -1;
    }
    *(int *)(this + 0xc) = iVar6;
  }
  if ((iVar6 != 0) && (0 < iVar6 / 2)) {
    iVar7 = 0;
    do {
      iVar2 = iVar7 * 2 + 2;
      iVar1 = iVar7 * 2 + 1;
      iVar4 = iVar7;
      if ((iVar1 < iVar6) &&
         (cVar5 = (**(code **)(this + 0x14))
                            (iVar7 * 0x38 + *(int *)this,iVar1 * 0x38 + *(int *)this), iVar4 = iVar1
         , cVar5 == '\0')) {
        iVar4 = iVar7;
      }
      if ((iVar2 < iVar6) &&
         (cVar5 = (**(code **)(this + 0x14))
                            (iVar4 * 0x38 + *(int *)this,iVar2 * 0x38 + *(int *)this), cVar5 != '\0'
         )) {
        iVar4 = iVar2;
      }
    } while ((iVar4 != iVar7) && (Swap(this,iVar7,iVar4), iVar7 = iVar4, iVar4 < iVar6 / 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)