L L4D2node

CServerGameDLL::GenerateLumpFileName

0x006c5230 · 175 bytes · __thiscall

_ZN14CServerGameDLL20GenerateLumpFileNameEPKcPcii

Decompiled

undefined (5 params)

/* CServerGameDLL::GenerateLumpFileName(char const*, char*, int, int) */

void __thiscall
CServerGameDLL::GenerateLumpFileName
          (CServerGameDLL *this,char *param_1,char *param_2,int param_3,int param_4)

{
  char cVar1;
  char *pcVar2;
  int in_GS_OFFSET;
  char local_124 [260];
  int local_20;
  
  pcVar2 = "h";
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  cVar1 = CTerrorGameRules::IsSurvivalMode();
  if (cVar1 == '\0') {
    cVar1 = CTerrorGameRules::IsScavengeMode();
    pcVar2 = "l";
    if (cVar1 != '\0') {
      pcVar2 = "s";
    }
  }
  V_StripExtension(param_1,local_124,0x104);
  V_snprintf(param_2,param_3,"%s_%s_%d%s",local_124,pcVar2,param_4,&DAT_00c8fd34);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)