L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)