L L4D2node

DownloadManager::FileReceived

0x0013d3a0 · 147 bytes · __thiscall

_ZN15DownloadManager12FileReceivedEPKcj

Decompiled

undefined (3 params)

/* DownloadManager::FileReceived(char const*, unsigned int) */

undefined4 __thiscall
DownloadManager::FileReceived(DownloadManager *this,char *param_1,uint param_2)

{
  int iVar1;
  char cVar2;
  
  iVar1 = *(int *)(this + 0x14);
  if (((iVar1 != 0) && (*(uint *)(iVar1 + 4) == param_2)) && (*(char *)(iVar1 + 3) == '\0')) {
    cVar2 = LoggingSystem_IsChannelEnabled(LOG_DownloadManager,0);
    if (cVar2 != '\0') {
      LoggingSystem_Log(LOG_DownloadManager,0,DownloadCompleteColor,"Download finished!\n");
    }
    CUtlVector<RequestContext*,CUtlMemory<RequestContext*,int>>::InsertBefore
              ((CUtlVector<RequestContext*,CUtlMemory<RequestContext*,int>> *)(this + 0x18),
               *(int *)(this + 0x24),(RequestContext **)(this + 0x14));
    *(undefined4 *)(this + 0x14) = 0;
    return 1;
  }
  return 0;
}

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)