L L4D2node

CStaticProp::GetClientModelRenderable

0x001e4e00 · 227 bytes · __thiscall

_ZN11CStaticProp24GetClientModelRenderableEv

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CStaticProp::GetClientModelRenderable() */

CStaticProp * __thiscall CStaticProp::GetClientModelRenderable(CStaticProp *this)

{
  char cVar1;
  int iVar2;
  undefined1 *puVar3;
  
  if ((((*(int *)(r_drawstaticprops._28_4_ + 0x30) != 1) ||
       (-1 < *(int *)(r_DrawSpecificStaticProp._28_4_ + 0x30))) ||
      (*(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)))) {
    return (CStaticProp *)0x0;
  }
  cVar1 = ConVar::IsFlagSet((ConVar *)sv_hosting_lobby,2);
  if (cVar1 == '\0') {
    puVar3 = sv_cheats;
LAB_001e4ea0:
    if (*(int *)(*(int *)(puVar3 + 0x1c) + 0x30) == 0) goto LAB_001e4eaa;
  }
  else {
    if ((g_pMatchFramework == (int *)0x0) ||
       (iVar2 = (**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework), iVar2 == 0)) {
      puVar3 = sv_cheats;
    }
    else {
      puVar3 = (undefined1 *)0x0;
    }
    if (((DAT_003b80d0 == 0 && _DAT_003b80cc == 0) &&
        (*(int *)(sv_hosting_lobby._28_4_ + 0x30) == 0)) && (puVar3 != (undefined1 *)0x0))
    goto LAB_001e4ea0;
LAB_001e4eaa:
    cVar1 = Cmd_IsRptActive();
    if (cVar1 == '\0') goto LAB_001e4ec3;
  }
  if (*(int *)(mat_wireframe._28_4_ + 0x30) != 0) {
    return (CStaticProp *)0x0;
  }
LAB_001e4ec3:
  if (*(int *)(r_drawmodelstatsoverlay._28_4_ + 0x30) != 0) {
    return (CStaticProp *)0x0;
  }
  return this + 0xc;
}

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)