L L4D2node

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

0x007140a0 · 239 bytes · __thiscall

_ZN17CUtlPriorityQueueI14OpenListInfo_t17COpenListLessFunc23CUtlMemoryFixedGrowableIS0_Lj4096EiEE6InsertERKS0_

Decompiled

undefined (2 params)

/* CUtlPriorityQueue<OpenListInfo_t, COpenListLessFunc, CUtlMemoryFixedGrowable<OpenListInfo_t,
   4096u, int> >::Insert(OpenListInfo_t const&) */

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

{
  uint uVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  int iVar4;
  undefined4 *puVar5;
  int iVar6;
  int iVar7;
  undefined4 *puVar8;
  float fVar9;
  
  uVar1 = *(uint *)(this + 0x8010);
  CUtlVector<OpenListInfo_t,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>::GrowVector
            ((CUtlVector<OpenListInfo_t,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>> *)this,1)
  ;
  if (0 < (int)(~uVar1 + *(int *)(this + 0x8010))) {
    _V_memmove((void *)(*(int *)this + 8 + uVar1 * 8),(void *)(*(int *)this + uVar1 * 8),
               (~uVar1 + *(int *)(this + 0x8010)) * 8);
  }
  iVar7 = uVar1 * 8;
  iVar6 = *(int *)this;
  uVar2 = *(undefined4 *)param_1;
  *(undefined4 *)(iVar6 + 4 + iVar7) = *(undefined4 *)(param_1 + 4);
  *(undefined4 *)(iVar6 + iVar7) = uVar2;
  if (uVar1 != 0) {
    iVar6 = (int)(uVar1 + 1) / 2 + -1;
    puVar5 = (undefined4 *)(*(int *)this + iVar6 * 8);
    puVar8 = (undefined4 *)(*(int *)this + iVar7);
    fVar9 = (float)puVar5[1];
    if ((float)puVar8[1] <= fVar9) {
      do {
        uVar2 = puVar8[1];
        uVar3 = *puVar5;
        *puVar5 = *puVar8;
        puVar5[1] = uVar2;
        iVar4 = *(int *)this;
        *(undefined4 *)(iVar7 + iVar4) = uVar3;
        ((undefined4 *)(iVar7 + iVar4))[1] = fVar9;
        if (iVar6 == 0) {
          return;
        }
        iVar7 = iVar6 * 8;
        iVar6 = (iVar6 + 1) / 2 + -1;
        puVar5 = (undefined4 *)(*(int *)this + iVar6 * 8);
        puVar8 = (undefined4 *)(*(int *)this + iVar7);
        fVar9 = (float)puVar5[1];
      } while ((float)puVar8[1] <= fVar9);
    }
  }
  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)