L L4D2node

CCurveData::Resort

0x00baa100 · 274 bytes · __thiscall

_ZN10CCurveData6ResortEP18ICurveDataAccessor

Decompiled

undefined (2 params)

/* CCurveData::Resort(ICurveDataAccessor*) */

void __thiscall CCurveData::Resort(CCurveData *this,ICurveDataAccessor *param_1)

{
  float fVar1;
  float fVar2;
  undefined2 uVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  undefined4 *puVar6;
  int iVar7;
  undefined4 *puVar8;
  int local_58;
  int local_54;
  int local_44;
  int local_40;
  
  local_54 = 0;
  local_58 = 10;
  local_44 = *(int *)(this + 0xc);
  if (0 < local_44) {
    do {
      local_54 = local_54 + 1;
      if (local_54 < local_44) {
        iVar7 = local_58;
        local_40 = local_54;
        do {
          puVar6 = (undefined4 *)(local_58 + -10 + *(int *)this);
          puVar8 = (undefined4 *)(*(int *)this + iVar7);
          uVar5 = *puVar6;
          fVar1 = (float)puVar6[1];
          fVar2 = (float)puVar8[1];
          uVar3 = *(undefined2 *)(puVar6 + 2);
          uVar4 = *(undefined2 *)(puVar8 + 2);
          if (fVar2 < fVar1) {
            *puVar6 = *puVar8;
            *(undefined2 *)(puVar6 + 2) = uVar4;
            puVar6[1] = fVar2;
            puVar6 = (undefined4 *)(*(int *)this + iVar7);
            puVar6[1] = fVar1;
            *puVar6 = uVar5;
            *(undefined2 *)(puVar6 + 2) = uVar3;
            local_44 = *(int *)(this + 0xc);
          }
          local_40 = local_40 + 1;
          iVar7 = iVar7 + 10;
        } while (local_40 < local_44);
      }
      local_58 = local_58 + 10;
    } while (local_54 < local_44);
  }
  RemoveOutOfRangeSamples(this,param_1);
  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)