L L4D2node

DownloadCache::Init

0x0013c790 · 153 bytes · __thiscall

_ZN13DownloadCache4InitEv

Decompiled

undefined (1 param)

/* DownloadCache::Init() */

void __thiscall DownloadCache::Init(DownloadCache *this)

{
  KeyValues *this_00;
  IBaseFileSystem *pIVar1;
  uint in_stack_ffffffe8;
  
  if (*(int *)this != 0) {
    KeyValues::deleteThis();
  }
  this_00 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffe8);
                    /* try { // try from 0013c7d2 to 0013c7d6 has its CatchHandler @ 0013c829 */
  KeyValues::KeyValues(this_00,"DownloadCache",(IKeyValuesSystem *)0x0,false);
  *(KeyValues **)this = this_00;
  pIVar1 = (IBaseFileSystem *)0x0;
  if (g_pFileSystem != (int *)0x0) {
    pIVar1 = (IBaseFileSystem *)(g_pFileSystem + 1);
  }
  KeyValues::LoadFromFile(this_00,pIVar1,"cache/DownloadCache.db",(char *)0x0);
  (**(code **)(*g_pFileSystem + 0x48))(g_pFileSystem,"cache","DEFAULT_WRITE_PATH");
  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)