L L4D2node

ClientPrecache

0x00642b30 · 496 bytes · unknown

_Z14ClientPrecachev

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ClientPrecache() */

void ClientPrecache(void)

{
  char cVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  char local_114 [260];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  ClientGamePrecache();
  cVar1 = (**(code **)(*engine + 0x1f8))(engine);
  if (cVar1 == '\0') {
    iVar3 = 0;
    do {
      V_snprintf(local_114,0x104,"cfg/cpu_level_%d_pc.ekv",iVar3);
      (**(code **)(*engine + 0x150))(engine,local_114);
      iVar2 = iVar3 + 1;
      V_snprintf(local_114,0x104,"cfg/cpu_level_%d_pc_ss.ekv",iVar3);
      (**(code **)(*engine + 0x150))(engine,local_114);
      iVar3 = iVar2;
    } while (iVar2 != 3);
    iVar3 = 0;
    do {
      iVar2 = iVar3 + 1;
      V_snprintf(local_114,0x104,"cfg/gpu_level_%d_pc.ekv",iVar3);
      (**(code **)(*engine + 0x150))(engine,local_114);
      iVar3 = iVar2;
    } while (iVar2 != 4);
    iVar3 = 0;
    do {
      iVar2 = iVar3 + 1;
      V_snprintf(local_114,0x104,"cfg/mem_level_%d_pc.ekv",iVar3);
      (**(code **)(*engine + 0x150))(engine,local_114);
      iVar3 = iVar2;
    } while (iVar2 != 3);
    iVar3 = 0;
    do {
      iVar2 = iVar3 + 1;
      V_snprintf(local_114,0x104,"cfg/gpu_mem_level_%d_pc.ekv",iVar3);
      (**(code **)(*engine + 0x150))(engine,local_114);
      iVar3 = iVar2;
    } while (iVar2 != 3);
  }
  else {
    (**(code **)(*engine + 0x150))(engine,"cfg/mem_level_360.ekv");
    (**(code **)(*engine + 0x150))(engine,"cfg/gpu_mem_level_360.ekv");
    (**(code **)(*engine + 0x150))(engine,"cfg/gpu_level_360.ekv");
    (**(code **)(*engine + 0x150))(engine,"cfg/cpu_level_360.ekv");
    (**(code **)(*engine + 0x150))(engine,"cfg/cpu_level_360_ss.ekv");
  }
  if (local_10 == *(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)