CUtlSortVector<unsigned_short,CEdgeList::EdgeLess>::Insert
0x001cf0b0 · 218 bytes · __thiscall
_ZN14CUtlSortVectorItN9CEdgeList8EdgeLessEE6InsertERKt
Decompiled
undefined (2 params)
/* CUtlSortVector<unsigned short, CEdgeList::EdgeLess>::Insert(unsigned short const&) */
int __thiscall
CUtlSortVector<unsigned_short,CEdgeList::EdgeLess>::Insert
(CUtlSortVector<unsigned_short,CEdgeList::EdgeLess> *this,ushort *param_1)
{
ushort *puVar1;
char cVar2;
int iVar3;
if ((this[0x18] != (CUtlSortVector<unsigned_short,CEdgeList::EdgeLess>)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<unsigned_short,CUtlMemory<unsigned_short,int>>::GrowVector
((CUtlVector<unsigned_short,CUtlMemory<unsigned_short,int>> *)this,1);
CUtlVector<unsigned_short,CUtlMemory<unsigned_short,int>>::ShiftElementsRight
((CUtlVector<unsigned_short,CUtlMemory<unsigned_short,int>> *)this,iVar3,1);
puVar1 = (ushort *)(*(int *)this + iVar3 * 2);
if (puVar1 != (ushort *)0x0) {
*puVar1 = *param_1;
}
return iVar3;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.