L L4D2node

COverlayMgr::AddFragmentListToRenderList

0x001cfc80 · 461 bytes · __thiscall

_ZN11COverlayMgr27AddFragmentListToRenderListEitb

Decompiled

undefined (4 params)

/* COverlayMgr::AddFragmentListToRenderList(int, unsigned short, bool) */

void __thiscall
COverlayMgr::AddFragmentListToRenderList(COverlayMgr *this,int param_1,ushort param_2,bool param_3)

{
  moverlayfragment_t *pmVar1;
  ushort uVar2;
  int iVar3;
  char cVar4;
  short sVar5;
  moverlay_t *pmVar6;
  int iVar7;
  
  if (param_2 != 0xffff) {
    iVar7 = *(int *)(this + 0x3c);
    do {
      while( true ) {
        pmVar1 = (moverlayfragment_t *)(iVar7 + (uint)param_2 * 0x2c);
        if (((param_3) || (*(int *)pmVar1 != g_OverlayRenderFrameID)) &&
           (pmVar6 = (moverlay_t *)(*(int *)(pmVar1 + 8) * 0xa8 + *(int *)(this + 0x28)),
           pmVar6 != (moverlay_t *)0x0)) break;
LAB_001cfcc8:
        param_2 = *(ushort *)(pmVar1 + 0x2a);
        if (param_2 == 0xffff) {
          return;
        }
      }
      if ((((((pmVar6[0xa4] != (moverlay_t)0x0) &&
             (*(int *)(this + 0x80) < (int)((byte)pmVar6[0xa4] - 1))) ||
            ((pmVar6[0xa5] != (moverlay_t)0x0 &&
             ((int)(uint)(byte)pmVar6[0xa5] <= *(int *)(this + 0x80))))) ||
           ((pmVar6[0xa6] != (moverlay_t)0x0 &&
            (*(int *)(this + 0x84) < (int)((byte)pmVar6[0xa6] - 1))))) ||
          ((pmVar6[0xa7] != (moverlay_t)0x0 &&
           ((int)(uint)(byte)pmVar6[0xa7] <= *(int *)(this + 0x84))))) ||
         (iVar3 = *(int *)(pmVar1 + 0x1c), iVar3 < 3)) goto LAB_001cfcc8;
      if (*(int *)(r_overlayfadeenable._28_4_ + 0x30) == 0) {
        if ((*(float *)(pmVar6 + 0x98) <= 0.0) ||
           (cVar4 = FadeOverlayFragment(this,pmVar6,pmVar1), cVar4 != '\0')) {
LAB_001cfd9d:
          *(int *)pmVar1 = g_OverlayRenderFrameID;
          uVar2 = *(ushort *)(pmVar1 + 0xe);
          iVar7 = (uint)uVar2 * 0x30 + *(int *)(this + 0xc) + param_1 * 8;
          sVar5 = *(short *)(iVar7 + 8);
          if (sVar5 == -1) {
            *(undefined2 *)(iVar7 + 10) = *(undefined2 *)(this + param_1 * 2 + 4);
            *(ushort *)(this + param_1 * 2 + 4) = uVar2;
            sVar5 = *(short *)(iVar7 + 8);
          }
          *(short *)(pmVar1 + 0xc) = sVar5;
          *(ushort *)(iVar7 + 8) = param_2;
          sVar5 = (short)iVar3;
          *(short *)(iVar7 + 0xc) = *(short *)(iVar7 + 0xc) + sVar5;
          *(short *)(iVar7 + 0xe) = *(short *)(iVar7 + 0xe) + sVar5 * 3 + -6;
        }
        iVar7 = *(int *)(this + 0x3c);
      }
      else {
        cVar4 = FadeOverlayFragmentGlobal(this,pmVar1);
        if (cVar4 != '\0') goto LAB_001cfd9d;
        iVar7 = *(int *)(this + 0x3c);
      }
      param_2 = *(ushort *)((uint)param_2 * 0x2c + iVar7 + 0x2a);
    } while (param_2 != 0xffff);
  }
  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)