L L4D2node

CStaticPropMgr::DrawStaticProps

0x001e6610 · 1017 bytes · __thiscall

_ZN14CStaticPropMgr15DrawStaticPropsEPP17IClientRenderablePK20RenderableInstance_tibb

Decompiled

undefined (6 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CStaticPropMgr::DrawStaticProps(IClientRenderable**, RenderableInstance_t const*, int, bool,
   bool) */

void __thiscall
CStaticPropMgr::DrawStaticProps
          (CStaticPropMgr *this,IClientRenderable **param_1,RenderableInstance_t *param_2,
          int param_3,bool param_4,bool param_5)

{
  uint *puVar1;
  int *piVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  char cVar5;
  int iVar6;
  int iVar7;
  undefined1 *puVar8;
  int iVar9;
  undefined4 local_24;
  undefined4 local_20;
  
  local_24 = 0;
  local_20 = 0;
  if (_Plat_SetBenchmarkMode == 0) {
    iVar9 = 0;
  }
  else {
    (**(code **)(_Plat_SetBenchmarkMode + 0x50))
              (_Plat_SetBenchmarkMode,&local_24,0,0,0,0,"/data/src/engine/./staticpropmgr.cpp",0x948
               ,&DrawStaticProps(IClientRenderable**,RenderableInstance_t_const*,int,bool,bool)::
                 tm_fmt,"(%s)%s","Static_Prop_Rendering","CStaticPropMgr::DrawStaticProps");
    iVar9 = _Plat_SetBenchmarkMode;
  }
  uVar4 = local_20;
  uVar3 = local_24;
  iVar7 = _DAT_0040b9d4;
                    /* try { // try from 001e66c5 to 001e66c9 has its CatchHandler @ 001e6a31 */
  if (((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) &&
     (iVar6 = ThreadGetCurrentId(), iVar7 == iVar6)) {
    if ((char *)*_DAT_0040b030 != "CStaticPropMgr::DrawStaticProps") {
                    /* try { // try from 001e6848 to 001e686b has its CatchHandler @ 001e6a31 */
      _DAT_0040b030 =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2beb20,(char *)0x0,0x2be779);
    }
    puVar1 = (uint *)(_DAT_0040b0bc + 4 + _DAT_0040b030[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0040b02c = '\0';
  }
  iVar7 = _DAT_0040b9d4;
  if ((*(int *)(r_drawstaticprops._28_4_ + 0x30) == 0) ||
     (*(int *)(cl_skipslowpath._28_4_ + 0x30) != 0)) {
    if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
       (iVar6 = ThreadGetCurrentId(), iVar7 == iVar6)) {
      cVar5 = CVProfNode::ExitScope();
      if (cVar5 != '\0') {
        _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
      }
      DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
    }
    if (iVar9 == 0) {
      return;
    }
    (**(code **)(iVar9 + 0x54))(iVar9,uVar3,uVar4,0,0,0);
    return;
  }
  if (((*(int *)(r_drawstaticprops._28_4_ + 0x30) == 1) &&
      (*(int *)(r_DrawSpecificStaticProp._28_4_ + 0x30) < 0)) &&
     ((*(int *)(r_colorstaticprops._28_4_ + 0x30) == 0 &&
      (((*(int *)(r_staticpropinfo._28_4_ + 0x30) == 0 &&
        (*(int *)(mat_fullbright._28_4_ + 0x30) == 0)) &&
       (*(int *)(r_drawmodellightorigin._28_4_ + 0x30) == 0)))))) {
                    /* try { // try from 001e691f to 001e6a17 has its CatchHandler @ 001e6a6b */
    cVar5 = ConVar::IsFlagSet((ConVar *)sv_hosting_lobby,2);
    if (cVar5 == '\0') {
      puVar8 = sv_cheats;
LAB_001e6969:
      if (*(int *)(*(int *)(puVar8 + 0x1c) + 0x30) == 0) goto LAB_001e6973;
LAB_001e697c:
      if (*(int *)(mat_wireframe._28_4_ + 0x30) != 0) goto LAB_001e6759;
    }
    else {
      if ((g_pMatchFramework == (int *)0x0) ||
         (iVar7 = (**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework), iVar7 == 0)) {
        puVar8 = sv_cheats;
      }
      else {
        puVar8 = (undefined1 *)0x0;
      }
      if (((DAT_003b80d0 == 0 && _DAT_003b80cc == 0) &&
          (*(int *)(sv_hosting_lobby._28_4_ + 0x30) == 0)) && (puVar8 != (undefined1 *)0x0))
      goto LAB_001e6969;
LAB_001e6973:
      cVar5 = Cmd_IsRptActive();
      if (cVar5 != '\0') goto LAB_001e697c;
    }
    if (((*(int *)(r_drawmodelstatsoverlay._28_4_ + 0x30) == 0) && (!param_5)) &&
       (*(int *)(r_slowpathwireframe._28_4_ + 0x30) == 0)) {
      if (*(int *)(pipeline_static_props._28_4_ + 0x30) == 0) {
        DrawStaticProps_Fast(this,param_1,param_2,param_3,param_4);
      }
      else {
        DrawStaticProps_FastPipeline(this,param_1,param_2,param_3,param_4);
      }
      goto LAB_001e676f;
    }
  }
LAB_001e6759:
  piVar2 = g_pMDLCache;
                    /* try { // try from 001e6764 to 001e6766 has its CatchHandler @ 001e6a6b */
  (**(code **)(*g_pMDLCache + 0x68))(g_pMDLCache);
  (**(code **)(*piVar2 + 0x6c))(piVar2);
LAB_001e676f:
  iVar7 = _DAT_0040b9d4;
  if (((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) &&
     (iVar6 = ThreadGetCurrentId(), iVar7 == iVar6)) {
    cVar5 = CVProfNode::ExitScope();
    if (cVar5 != '\0') {
      _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
    }
    DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
  }
  if (iVar9 == 0) {
    return;
  }
  (**(code **)(iVar9 + 0x54))(iVar9,uVar3,uVar4,0,0,0);
  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)