L L4D2node

Map_CheckForHDR

0x00195f70 · 205 bytes · __cdecl

_Z15Map_CheckForHDRP7model_tPKc

Decompiled

undefined (2 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Map_CheckForHDR(model_t*, char const*) */

bool Map_CheckForHDR(model_t *param_1,char *param_2)

{
  int iVar1;
  bool bVar2;
  bool bVar3;
  
  CMapLoadHelper::Init(param_1,param_2);
  iVar1 = _DAT_003a8340;
  if (_DAT_003a832c == 0) {
    iVar1 = _DAT_003a8a60;
  }
  bVar2 = false;
  if (0 < iVar1) {
    iVar1 = _DAT_003a835c;
    if (_DAT_003a8348 == 0) {
      iVar1 = _DAT_003a8a70;
    }
    bVar2 = 0 < iVar1;
  }
  if (0x13 < DAT_003a8704) {
    iVar1 = _DAT_003a8378;
    if (_DAT_003a8364 == 0) {
      iVar1 = _DAT_003a8a80;
    }
    if (iVar1 == 0) {
      bVar2 = false;
      bVar3 = false;
      goto LAB_00196006;
    }
  }
  bVar3 = false;
  if ((bVar2 != false) && (1 < *(int *)(mat_hdr_level._28_4_ + 0x30))) {
    iVar1 = (**(code **)(*g_pMaterialSystemHardwareConfig + 0x90))(g_pMaterialSystemHardwareConfig);
    bVar3 = iVar1 != 0;
  }
LAB_00196006:
  EnableHDR(bVar3);
  Map_CheckFeatureFlags();
  s_nMapLoadRecursion = s_nMapLoadRecursion + -1;
  if (0 < s_nMapLoadRecursion) {
    return bVar2;
  }
  CMapLoadHelper::Shutdown();
  return bVar2;
}

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)