L L4D2node

CEdgeList::IntroduceNewActiveEdges

0x001cc3d0 · 269 bytes · __thiscall

_ZN9CEdgeList23IntroduceNewActiveEdgesEf

Decompiled

undefined (2 params)

/* CEdgeList::IntroduceNewActiveEdges(float) */

void __thiscall CEdgeList::IntroduceNewActiveEdges(CEdgeList *this,float param_1)

{
  float fVar1;
  float fVar2;
  int iVar3;
  CEdgeList *pCVar4;
  int iVar5;
  float *pfVar6;
  
  iVar3 = *(int *)(this + 0x3c);
  iVar5 = *(int *)(this + 0x11c);
  if (iVar5 != iVar3) {
    pfVar6 = (float *)((uint)*(ushort *)(*(int *)(this + 0x30) + iVar5 * 2) * 0x30 + *(int *)this);
    fVar1 = pfVar6[1];
    while (fVar1 <= param_1) {
      fVar2 = pfVar6[4];
      if (param_1 < fVar2) {
        pfVar6[8] = pfVar6[6] * (param_1 - fVar1) + *pfVar6;
        if (fVar2 < *(float *)(this + 0x120)) {
          *(float *)(this + 0x120) = fVar2;
        }
        pCVar4 = *(CEdgeList **)(this + 0x9c);
        if (pCVar4 != this + 0x44) {
          do {
            if ((*(float *)(pCVar4 + 0x20) - pfVar6[8] <= 0.0) &&
               ((*(float *)(pCVar4 + 0x20) - pfVar6[8] < 0.0 ||
                (*(float *)(pCVar4 + 0x18) <= pfVar6[6])))) break;
            pCVar4 = *(CEdgeList **)(pCVar4 + 0x28);
          } while (pCVar4 != this + 0x44);
        }
        fVar1 = *(float *)(pCVar4 + 0x2c);
        pfVar6[10] = (float)pCVar4;
        pfVar6[0xb] = fVar1;
        *(float **)((int)fVar1 + 0x28) = pfVar6;
        *(float **)(pCVar4 + 0x2c) = pfVar6;
        iVar5 = *(int *)(this + 0x11c);
      }
      iVar5 = iVar5 + 1;
      *(int *)(this + 0x11c) = iVar5;
      if (iVar5 == iVar3) {
        return;
      }
      pfVar6 = (float *)((uint)*(ushort *)(*(int *)(this + 0x30) + iVar5 * 2) * 0x30 + *(int *)this)
      ;
      fVar1 = pfVar6[1];
    }
    if (fVar1 < *(float *)(this + 0x120)) {
      *(float *)(this + 0x120) = fVar1;
    }
  }
  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)