L L4D2node

CUtlSortVector<int,WingedEdgeLessFunc>::Insert

0x001cf380 · 216 bytes · __thiscall

_ZN14CUtlSortVectorIi18WingedEdgeLessFuncE6InsertERKi

Decompiled

undefined (2 params)

/* CUtlSortVector<int, WingedEdgeLessFunc>::Insert(int const&) */

int __thiscall
CUtlSortVector<int,WingedEdgeLessFunc>::Insert
          (CUtlSortVector<int,WingedEdgeLessFunc> *this,int *param_1)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  
  if ((this[0x18] != (CUtlSortVector<int,WingedEdgeLessFunc>)0x0) &&
     (iVar3 = LoggingSystem_LogAssert
                        ("%s (%d) : %s\n","/data/src/public/tier1/utlsortvector.h",0x94,
                         "Assertion Failed: !m_bNeedsSort"), iVar3 == 1)) {
    cVar2 = ShouldUseNewAssertDialog();
    if ((cVar2 == '\0') ||
       (cVar2 = DoNewAssertDialog("/data/src/public/tier1/utlsortvector.h",0x94,
                                  "Assertion Failed: !m_bNeedsSort"), cVar2 != '\0')) {
      raise(5);
    }
    _ExitOnFatalAssert("/data/src/public/tier1/utlsortvector.h",0x94);
  }
  iVar3 = FindLessOrEqual(this,param_1);
  iVar3 = iVar3 + 1;
  CUtlVector<int,CUtlMemory<int,int>>::GrowVector((CUtlVector<int,CUtlMemory<int,int>> *)this,1);
  CUtlVector<int,CUtlMemory<int,int>>::ShiftElementsRight
            ((CUtlVector<int,CUtlMemory<int,int>> *)this,iVar3,1);
  piVar1 = (int *)(*(int *)this + iVar3 * 4);
  if (piVar1 != (int *)0x0) {
    *piVar1 = *param_1;
  }
  return iVar3;
}

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)