CUtlVector<EntityLocationInfo<CHandle<CBaseEntity>>,CUtlMemory<EntityLocationInfo<CHandle<CBaseEntity>>,int>>::Sort
0x008aa3e0 · 328 bytes · __thiscall
_ZN10CUtlVectorI18EntityLocationInfoI7CHandleI11CBaseEntityEE10CUtlMemoryIS4_iEE4SortEPFiPKS4_S9_E
Decompiled
undefined (2 params)
/* CUtlVector<EntityLocationInfo<CHandle<CBaseEntity> >,
CUtlMemory<EntityLocationInfo<CHandle<CBaseEntity> >, int> >::Sort(int
(*)(EntityLocationInfo<CHandle<CBaseEntity> > const*, EntityLocationInfo<CHandle<CBaseEntity> >
const*)) */
void __thiscall
CUtlVector<EntityLocationInfo<CHandle<CBaseEntity>>,CUtlMemory<EntityLocationInfo<CHandle<CBaseEntity>>,int>>
::Sort(CUtlVector<EntityLocationInfo<CHandle<CBaseEntity>>,CUtlMemory<EntityLocationInfo<CHandle<CBaseEntity>>,int>>
*this,_func_int_EntityLocationInfo_ptr_EntityLocationInfo_ptr *param_1)
{
undefined4 uVar1;
undefined4 uVar2;
undefined4 uVar3;
undefined4 uVar4;
undefined4 uVar5;
undefined4 uVar6;
size_t __nmemb;
undefined4 uVar7;
undefined4 uVar8;
int iVar9;
int iVar10;
int iVar11;
undefined4 *puVar12;
undefined4 *puVar13;
int local_24;
__nmemb = *(size_t *)(this + 0xc);
if (1 < (int)__nmemb) {
if (*(void **)this == (void *)0x0) {
local_24 = __nmemb - 1;
do {
if (0 < local_24) {
iVar10 = 1;
do {
while( true ) {
iVar11 = iVar10 * 0x20;
iVar9 = (*param_1)((EntityLocationInfo *)(*(int *)this + iVar11 + -0x20),
(EntityLocationInfo *)(*(int *)this + iVar11));
if (-1 < iVar9) break;
iVar10 = iVar10 + 1;
puVar12 = (undefined4 *)(iVar11 + *(int *)this);
puVar13 = (undefined4 *)(iVar11 + -0x20 + *(int *)this);
uVar1 = *puVar13;
*puVar13 = *puVar12;
uVar2 = puVar13[1];
uVar3 = puVar13[2];
puVar13[1] = puVar12[1];
uVar4 = puVar13[3];
uVar7 = puVar13[7];
puVar13[2] = puVar12[2];
uVar5 = puVar13[4];
uVar6 = puVar13[5];
puVar13[3] = puVar12[3];
uVar8 = puVar13[6];
puVar13[4] = puVar12[4];
puVar13[5] = puVar12[5];
puVar13[6] = puVar12[6];
puVar13[7] = puVar12[7];
*puVar12 = uVar1;
puVar12[1] = uVar2;
puVar12[2] = uVar3;
puVar12[3] = uVar4;
puVar12[4] = uVar5;
puVar12[5] = uVar6;
puVar12[6] = uVar8;
puVar12[7] = uVar7;
if (local_24 < iVar10) goto LAB_008aa518;
}
iVar10 = iVar10 + 1;
} while (iVar10 <= local_24);
}
LAB_008aa518:
local_24 = local_24 + -1;
if (local_24 == -1) {
return;
}
} while( true );
}
qsort(*(void **)this,__nmemb,0x20,(__compar_fn_t)param_1);
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.