L L4D2node

CStaticPropMgr::DrawStaticProps_Fast

0x001e6280 · 522 bytes · __thiscall

_ZN14CStaticPropMgr20DrawStaticProps_FastEPP17IClientRenderablePK20RenderableInstance_tib

Decompiled

undefined (5 params)

/* CStaticPropMgr::DrawStaticProps_Fast(IClientRenderable**, RenderableInstance_t const*, int, bool)
    */

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

{
  IClientRenderable *pIVar1;
  int *piVar2;
  int *piVar3;
  IClientRenderable *pIVar4;
  int iVar5;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  IClientRenderable *local_48;
  undefined4 local_44;
  IClientRenderable *local_40;
  undefined4 local_3c;
  IClientRenderable *local_38;
  int local_34;
  undefined4 local_30;
  uint local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined2 local_20;
  
  local_64 = 0x3f800000;
  local_68 = 0x3f800000;
  local_6c = 0x3f800000;
  (**(code **)(*g_pStudioRender + 0x5c))(g_pStudioRender,&local_6c);
  (**(code **)(*g_pStudioRender + 0x60))(g_pStudioRender,0x3f800000);
  (**(code **)(*g_pStudioRender + 0x4c))
            (g_pStudioRender,g_CurrentViewOrigin,g_CurrentViewRight,g_CurrentViewUp,
             g_CurrentViewForward);
  piVar3 = (int *)(**(code **)(*materials + 0x180))(materials);
  if (piVar3 != (int *)0x0) {
                    /* try { // try from 001e6318 to 001e631a has its CatchHandler @ 001e648e */
    (**(code **)(*piVar3 + 8))(piVar3);
  }
                    /* try { // try from 001e632b to 001e633d has its CatchHandler @ 001e64ca */
  (**(code **)(*piVar3 + 0x50))(piVar3,10);
  (**(code **)(*piVar3 + 0x54))(piVar3);
  (**(code **)(*piVar3 + 0x7c))(piVar3);
  local_40 = (IClientRenderable *)0x0;
  iVar5 = 0;
  local_3c = 0;
  local_38 = (IClientRenderable *)0x0;
  local_34 = (-(uint)!param_4 & 0xc0000000) + 0x40000011;
  local_30 = 0xffffffff;
  local_28 = 0;
  local_24 = 0;
  if (0 < param_3) {
    do {
      while( true ) {
        piVar2 = g_pMDLCache;
                    /* try { // try from 001e6426 to 001e6428 has its CatchHandler @ 001e64ca */
        (**(code **)(*g_pMDLCache + 0x68))(g_pMDLCache);
        pIVar1 = param_1[iVar5];
        pIVar4 = pIVar1 + -4;
        if (pIVar1 == (IClientRenderable *)0x0) {
          pIVar4 = (IClientRenderable *)0x0;
        }
        if (*(int *)(pIVar4 + 0x28) != 0) break;
        iVar5 = iVar5 + 1;
        (**(code **)(*piVar2 + 0x6c))(piVar2);
        if (iVar5 == param_3) goto LAB_001e6458;
      }
      local_20 = *(undefined2 *)(pIVar4 + 0x2e);
      local_44 = *(undefined4 *)(pIVar4 + 0x28);
      local_2c = (uint)(byte)pIVar4[0x3a];
      local_60 = *(undefined4 *)(pIVar4 + 0x10);
      local_5c = *(undefined4 *)(pIVar4 + 0x14);
      local_58 = *(undefined4 *)(pIVar4 + 0x18);
      local_54 = *(undefined4 *)(pIVar4 + 0x1c);
      local_50 = *(undefined4 *)(pIVar4 + 0x20);
      local_4c = *(undefined4 *)(pIVar4 + 0x24);
      local_38 = pIVar4 + 0xb8;
      local_40 = pIVar4 + 0x6c;
                    /* try { // try from 001e6404 to 001e6406 has its CatchHandler @ 001e64a3 */
      local_48 = pIVar1;
      (**(code **)(*(int *)modelrender + 0x44))(modelrender,&local_60);
      iVar5 = iVar5 + 1;
      (**(code **)(*piVar2 + 0x6c))(piVar2);
    } while (iVar5 != param_3);
  }
LAB_001e6458:
                    /* try { // try from 001e6468 to 001e6475 has its CatchHandler @ 001e64ca */
  (**(code **)(*piVar3 + 0x50))(piVar3,10);
  (**(code **)(*piVar3 + 0x58))(piVar3);
  (**(code **)(*piVar3 + 0xc))(piVar3);
  (**(code **)(*piVar3 + 4))(piVar3);
  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)