CEdgeList::ReorderActiveEdgeList
0x001cc6c0 · 302 bytes · __thiscall
_ZN9CEdgeList21ReorderActiveEdgeListEiPPNS_6Edge_tE
Decompiled
undefined (3 params)
/* CEdgeList::ReorderActiveEdgeList(int, CEdgeList::Edge_t**) */
void __thiscall CEdgeList::ReorderActiveEdgeList(CEdgeList *this,int param_1,Edge_t **param_2)
{
Edge_t **ppEVar1;
float fVar2;
int iVar3;
CEdgeList *pCVar4;
CEdgeList *pCVar5;
int iVar6;
Edge_t *pEVar7;
CEdgeList *pCVar8;
int iVar9;
Edge_t *pEVar10;
float fVar11;
iVar6 = 0;
if (0 < param_1) {
do {
pEVar10 = param_2[iVar6];
iVar3 = *(int *)(pEVar10 + 0x28);
fVar2 = *(float *)(*(int *)(pEVar10 + 0x28) + 0x20);
do {
fVar11 = fVar2;
iVar9 = iVar3;
iVar3 = *(int *)(iVar9 + 0x28);
fVar2 = *(float *)(iVar3 + 0x20);
} while (fVar2 == fVar11);
pEVar7 = *(Edge_t **)(pEVar10 + 0x2c);
iVar6 = iVar6 + 1;
while( true ) {
for (; (iVar6 < param_1 && (ppEVar1 = param_2 + iVar6, *ppEVar1 == pEVar7));
iVar6 = iVar6 + 1) {
pEVar7 = *(Edge_t **)(pEVar7 + 0x2c);
pEVar10 = *ppEVar1;
}
if (*(float *)(pEVar10 + 0x20) != *(float *)(pEVar7 + 0x20)) break;
pEVar7 = *(Edge_t **)(pEVar7 + 0x2c);
}
for (pEVar10 = *(Edge_t **)(iVar9 + 0x2c); pEVar7 != pEVar10;
pEVar10 = *(Edge_t **)(pEVar10 + 0x2c)) {
*(float *)(pEVar10 + 0x20) = fVar11;
}
} while (iVar6 < param_1);
}
pCVar4 = *(CEdgeList **)(this + 0x70);
do {
do {
pCVar5 = pCVar4;
if (pCVar5 == this + 0x74) {
return;
}
pCVar8 = *(CEdgeList **)(pCVar5 + 0x28);
pCVar4 = *(CEdgeList **)(pCVar5 + 0x2c);
} while (*(float *)(pCVar8 + 0x20) != *(float *)(pCVar5 + 0x20));
*(CEdgeList **)(pCVar8 + 0x2c) = pCVar4;
*(undefined4 *)(*(int *)(pCVar5 + 0x2c) + 0x28) = *(undefined4 *)(pCVar5 + 0x28);
if (pCVar8 != this + 0x44) {
do {
if ((*(float *)(pCVar8 + 0x20) - *(float *)(pCVar5 + 0x20) <= 0.0) &&
((*(float *)(pCVar8 + 0x20) - *(float *)(pCVar5 + 0x20) < 0.0 ||
(*(float *)(pCVar8 + 0x18) <= *(float *)(pCVar5 + 0x18))))) break;
pCVar8 = *(CEdgeList **)(pCVar8 + 0x28);
} while (pCVar8 != this + 0x44);
}
iVar6 = *(int *)(pCVar8 + 0x2c);
*(CEdgeList **)(pCVar5 + 0x28) = pCVar8;
*(int *)(pCVar5 + 0x2c) = iVar6;
*(CEdgeList **)(iVar6 + 0x28) = pCVar5;
*(CEdgeList **)(pCVar8 + 0x2c) = pCVar5;
} while( true );
}
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.