CUtlVector<CNavArea*,CUtlMemoryConservative<CNavArea*>>::InsertBefore
0x00721ec0 · 140 bytes · __thiscall
_ZN10CUtlVectorIP8CNavArea22CUtlMemoryConservativeIS1_EE12InsertBeforeEiRKS1_
Decompiled
undefined (3 params)
/* CUtlVector<CNavArea*, CUtlMemoryConservative<CNavArea*> >::InsertBefore(int, CNavArea* const&) */
int __thiscall
CUtlVector<CNavArea*,CUtlMemoryConservative<CNavArea*>>::InsertBefore
(CUtlVector<CNavArea*,CUtlMemoryConservative<CNavArea*>> *this,int param_1,
CNavArea **param_2)
{
int iVar1;
void *pvVar2;
int iVar3;
iVar3 = *(int *)(this + 8) + 1;
if ((int)(*(uint *)(this + 4) >> 2) < iVar3) {
pvVar2 = realloc(*(void **)this,iVar3 * 4);
*(int *)(this + 4) = iVar3 * 4;
*(void **)this = pvVar2;
iVar3 = *(int *)(this + 8) + 1;
}
else {
pvVar2 = *(void **)this;
}
*(int *)(this + 8) = iVar3;
iVar1 = param_1 * 4;
iVar3 = (iVar3 - param_1) + -1;
*(void **)(this + 0xc) = pvVar2;
if (0 < iVar3) {
_V_memmove((void *)((int)pvVar2 + iVar1 + 4),(void *)((int)pvVar2 + iVar1),iVar3 * 4);
pvVar2 = *(void **)this;
}
if ((undefined4 *)((int)pvVar2 + iVar1) != (undefined4 *)0x0) {
*(undefined4 *)((int)pvVar2 + iVar1) = *param_2;
}
return param_1;
}
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.