L L4D2node

UpdateStudioRenderConfig

0x001860c0 · 873 bytes · unknown

_Z24UpdateStudioRenderConfigv

Decompiled

undefined (0 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* UpdateStudioRenderConfig() */

void UpdateStudioRenderConfig(void)

{
  char cVar1;
  undefined1 *puVar2;
  int iVar3;
  undefined4 *puVar4;
  bool bVar5;
  
  if (g_pMaterialSystemConfig == 0) {
    return;
  }
  if (g_pStudioRender == (int *)0x0) {
    return;
  }
  puVar4 = &s_StudioRenderConfig;
  for (iVar3 = 0xe; iVar3 != 0; iVar3 = iVar3 + -1) {
    *puVar4 = 0;
    puVar4 = puVar4 + 1;
  }
  DAT_003a58e4 = DAT_003a58e4 & 0xfe | *(int *)(r_eyemove._28_4_ + 0x30) != 0;
  s_StudioRenderConfig = *(undefined4 *)(r_eyeshift_x._28_4_ + 0x2c);
  DAT_003a58c4 = *(undefined4 *)(r_eyeshift_y._28_4_ + 0x2c);
  _DAT_003a58c8 = *(undefined4 *)(r_eyeshift_z._28_4_ + 0x2c);
  _DAT_003a58cc = *(undefined4 *)(r_eyesize._28_4_ + 0x2c);
  if (*(int *)(mat_softwareskin._28_4_ + 0x30) == 0) {
    cVar1 = ConVar::IsFlagSet((ConVar *)sv_hosting_lobby,2);
    if (cVar1 == '\0') {
      puVar2 = sv_cheats;
LAB_001863ed:
      if (*(int *)(*(int *)(puVar2 + 0x1c) + 0x30) == 0) goto LAB_001863f7;
LAB_00186400:
      if (*(int *)(mat_wireframe._28_4_ + 0x30) != 0) goto LAB_00186167;
    }
    else {
      if ((g_pMatchFramework == (int *)0x0) ||
         (iVar3 = (**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework), iVar3 == 0)) {
        puVar2 = sv_cheats;
      }
      else {
        puVar2 = (undefined1 *)0x0;
      }
      if (((DAT_003b80d0 == 0 && _DAT_003b80cc == 0) &&
          (*(int *)(sv_hosting_lobby._28_4_ + 0x30) == 0)) && (puVar2 != (undefined1 *)0x0))
      goto LAB_001863ed;
LAB_001863f7:
      cVar1 = Cmd_IsRptActive();
      if (cVar1 != '\0') goto LAB_00186400;
    }
    if (*(int *)(r_slowpathwireframe._28_4_ + 0x30) != 0) goto LAB_00186167;
    DAT_003a58e4 = DAT_003a58e4 & 0xfd;
  }
  else {
LAB_00186167:
    DAT_003a58e4 = DAT_003a58e4 | 2;
  }
  _DAT_003a58d8 = *(undefined4 *)(r_drawentities._28_4_ + 0x30);
  DAT_003a58e4 = DAT_003a58e4 & 0x83 | (*(int *)(r_nohw._28_4_ + 0x30) != 0) << 2 |
                 (*(int *)(r_nosw._28_4_ + 0x30) != 0) << 3 |
                 (*(int *)(r_teeth._28_4_ + 0x30) != 0) << 4 |
                 (*(int *)(r_flex._28_4_ + 0x30) != 0) << 6 |
                 (*(int *)(r_eyes._28_4_ + 0x30) != 0) << 5;
  cVar1 = ConVar::IsFlagSet((ConVar *)sv_hosting_lobby,2);
  if (cVar1 == '\0') {
    puVar2 = sv_cheats;
LAB_00186211:
    if (*(int *)(*(int *)(puVar2 + 0x1c) + 0x30) == 0) goto LAB_0018621b;
LAB_00186228:
    bVar5 = true;
    if (*(int *)(mat_wireframe._28_4_ + 0x30) != 0) goto LAB_0018623e;
  }
  else {
    if ((g_pMatchFramework == (int *)0x0) ||
       (iVar3 = (**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework), iVar3 == 0)) {
      puVar2 = sv_cheats;
    }
    else {
      puVar2 = (undefined1 *)0x0;
    }
    if (((DAT_003b80d0 == 0 && _DAT_003b80cc == 0) &&
        (*(int *)(sv_hosting_lobby._28_4_ + 0x30) == 0)) && (puVar2 != (undefined1 *)0x0))
    goto LAB_00186211;
LAB_0018621b:
    cVar1 = Cmd_IsRptActive();
    if (cVar1 != '\0') goto LAB_00186228;
  }
  bVar5 = *(int *)(r_slowpathwireframe._28_4_ + 0x30) != 0;
LAB_0018623e:
  DAT_003a58e4 = DAT_003a58e4 & 0x7f | bVar5 << 7;
  _DAT_003a58dc = *(undefined4 *)(r_skin._28_4_ + 0x30);
  _DAT_003a58d4 = *(undefined4 *)(r_maxmodeldecal._28_4_ + 0x30);
  _DAT_003a58e0 = (uint)*(byte *)(g_pMaterialSystemConfig + 0x49);
  DAT_003a58e5 = DAT_003a58e5 & 0xc6 | *(int *)(mat_normals._28_4_ + 0x30) != 0 |
                 (*(int *)(r_modelwireframedecal._28_4_ + 0x30) != 0) << 5 |
                 (*(byte *)(g_pMaterialSystemConfig + 0x43) & 1) << 3 |
                 (*(int *)(r_showenvcubemap._28_4_ + 0x30) != 0) << 4;
  _DAT_003a58d0 = *(undefined4 *)(r_eyeglintlodpixels._28_4_ + 0x2c);
  (**(code **)(*g_pStudioRender + 0x20))(g_pStudioRender,&s_StudioRenderConfig);
  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)