L L4D2node

COverlayMgr::Disp_CreateFragments

0x001d3b90 · 200 bytes · __thiscall

_ZN11COverlayMgr20Disp_CreateFragmentsEP10moverlay_tP11msurface2_t

Decompiled

undefined (3 params)

/* COverlayMgr::Disp_CreateFragments(moverlay_t*, msurface2_t*) */

void __thiscall
COverlayMgr::Disp_CreateFragments(COverlayMgr *this,moverlay_t *param_1,msurface2_t *param_2)

{
  undefined4 *puVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  int local_30 [8];
  
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
                    /* try { // try from 001d3bd7 to 001d3bf9 has its CatchHandler @ 001d3c58 */
  cVar2 = Disp_PreClipFragment(this,param_1,(CUtlVector *)local_30,param_2);
  if ((cVar2 != '\0') && (*(CDispInfo **)(param_2 + 0x18) != (CDispInfo *)0x0)) {
    Disp_ClipFragment(this,*(CDispInfo **)(param_2 + 0x18),(CUtlVector *)local_30);
  }
  iVar3 = local_30[3] + -1;
  iVar4 = iVar3 * 4;
  if (-1 < iVar3) {
    do {
      iVar3 = iVar3 + -1;
      puVar1 = (undefined4 *)(local_30[0] + iVar4);
      iVar4 = iVar4 + -4;
      DestroyTempFragment(this,(moverlayfragment_t *)*puVar1);
    } while (iVar3 != -1);
  }
  local_30[3] = 0;
  CUtlMemory<moverlayfragment_t*,int>::Purge((CUtlMemory<moverlayfragment_t*,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<moverlayfragment_t*,int>::Purge((CUtlMemory<moverlayfragment_t*,int> *)local_30);
  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)