L L4D2node

CWingedEdgeList::AdvanceActiveEdgeList

0x001cb980 · 395 bytes · __thiscall

_ZN15CWingedEdgeList21AdvanceActiveEdgeListEf

Decompiled

undefined (2 params)

/* CWingedEdgeList::AdvanceActiveEdgeList(float) */

undefined4 __thiscall CWingedEdgeList::AdvanceActiveEdgeList(CWingedEdgeList *this,float param_1)

{
  float fVar1;
  CWingedEdgeList *pCVar2;
  int iVar3;
  CWingedEdgeList *pCVar4;
  int iVar5;
  float *pfVar6;
  float fVar7;
  
  *(undefined4 *)(this + 0x74) = 0x7f7fffff;
  pCVar4 = *(CWingedEdgeList **)(this + 0x2c);
  while (pCVar4 != this + 0x30) {
    fVar1 = *(float *)(pCVar4 + 0x10);
    pCVar2 = *(CWingedEdgeList **)(pCVar4 + 0x2c);
    if (param_1 < fVar1) {
      *(float *)(pCVar4 + 0x20) =
           (param_1 - *(float *)(pCVar4 + 4)) * *(float *)(pCVar4 + 0x18) + *(float *)pCVar4;
      pCVar4 = pCVar2;
      if (fVar1 < *(float *)(this + 0x74)) {
        *(float *)(this + 0x74) = fVar1;
      }
    }
    else {
      *(CWingedEdgeList **)((int)*(float *)(pCVar4 + 0x28) + 0x2c) = pCVar2;
      *(float *)((int)*(float *)(pCVar4 + 0x2c) + 0x28) = *(float *)(pCVar4 + 0x28);
      pCVar4 = pCVar2;
    }
  }
  iVar3 = *(int *)(this + 0x88);
  iVar5 = *(int *)(this + 0x78);
  if (iVar5 == iVar3) {
LAB_001cbb00:
    return CONCAT31((int3)((uint)iVar5 >> 8),*(float *)(this + 0x74) != 3.4028235e+38);
  }
  pfVar6 = (float *)(iVar5 * 0x30 + *(int *)(this + 0x7c));
  fVar1 = pfVar6[1];
  do {
    if (param_1 < fVar1) {
      fVar7 = *(float *)(this + 0x74);
      if (fVar1 < *(float *)(this + 0x74)) {
        *(float *)(this + 0x74) = fVar1;
        fVar7 = fVar1;
      }
      return CONCAT31((int3)((uint)iVar5 >> 8),fVar7 != 3.4028235e+38);
    }
    fVar7 = pfVar6[4];
    if (param_1 < fVar7) {
      pfVar6[8] = pfVar6[6] * (param_1 - fVar1) + *pfVar6;
      if (fVar7 < *(float *)(this + 0x74)) {
        *(float *)(this + 0x74) = fVar7;
      }
      pCVar4 = *(CWingedEdgeList **)(this + 0x58);
      if (pCVar4 != this) {
        do {
          if ((*(float *)(pCVar4 + 0x20) - pfVar6[8] <= 0.0) &&
             ((*(float *)(pCVar4 + 0x20) - pfVar6[8] < 0.0 ||
              (*(float *)(pCVar4 + 0x18) <= pfVar6[6])))) break;
          pCVar4 = *(CWingedEdgeList **)(pCVar4 + 0x28);
        } while (pCVar4 != this);
      }
      fVar1 = *(float *)(pCVar4 + 0x2c);
      pfVar6[10] = (float)pCVar4;
      pfVar6[0xb] = fVar1;
      *(float **)((int)fVar1 + 0x28) = pfVar6;
      *(float **)(pCVar4 + 0x2c) = pfVar6;
      iVar5 = *(int *)(this + 0x78);
    }
    iVar5 = iVar5 + 1;
    *(int *)(this + 0x78) = iVar5;
    if (iVar5 == iVar3) goto LAB_001cbb00;
    pfVar6 = (float *)(iVar5 * 0x30 + *(int *)(this + 0x7c));
    fVar1 = pfVar6[1];
  } while( true );
}

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)