CSentence::Resort
0x000dd890 · 198 bytes · __thiscall
_ZN9CSentence6ResortEv
Decompiled
undefined (1 param)
/* CSentence::Resort() */
void __thiscall CSentence::Resort(CSentence *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
undefined1 uVar5;
int iVar6;
float *pfVar7;
int iVar8;
float *pfVar9;
int iVar10;
int local_24;
int local_20;
iVar6 = *(int *)(this + 0x3c);
if (0 < iVar6) {
local_20 = 1;
local_24 = 0xc;
if (iVar6 != 1) {
do {
iVar8 = local_24;
iVar10 = local_20;
do {
pfVar7 = (float *)(*(int *)(this + 0x30) + local_24 + -0xc);
uVar5 = *(undefined1 *)(pfVar7 + 2);
fVar1 = *pfVar7;
fVar2 = pfVar7[1];
pfVar9 = (float *)(*(int *)(this + 0x30) + iVar8);
fVar3 = *pfVar9;
fVar4 = pfVar9[1];
if (fVar3 < fVar1) {
*(undefined1 *)(pfVar7 + 2) = *(undefined1 *)(pfVar9 + 2);
*pfVar7 = fVar3;
pfVar7[1] = fVar4;
pfVar7 = (float *)(*(int *)(this + 0x30) + iVar8);
*pfVar7 = fVar1;
pfVar7[1] = fVar2;
*(undefined1 *)(pfVar7 + 2) = uVar5;
}
iVar10 = iVar10 + 1;
iVar8 = iVar8 + 0xc;
} while (iVar10 != iVar6);
local_20 = local_20 + 1;
local_24 = local_24 + 0xc;
} while (local_20 != iVar6);
}
}
return;
}
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.