L L4D2node

CMaterialReference::Init

0x00bd6690 · 123 bytes · __thiscall

_ZN18CMaterialReference4InitEPKcS1_b

Decompiled

undefined (4 params)

/* CMaterialReference::Init(char const*, char const*, bool) */

void __thiscall
CMaterialReference::Init(CMaterialReference *this,char *param_1,char *param_2,bool param_3)

{
  char cVar1;
  IMaterial *pIVar2;
  
  pIVar2 = (IMaterial *)(**(code **)(*materials + 0x11c))(materials,param_1,param_2,param_3,0);
  if (pIVar2 != (IMaterial *)0x0) {
    cVar1 = (**(code **)(*(int *)pIVar2 + 0xa8))(pIVar2);
    if (cVar1 == '\0') goto LAB_00bd66f6;
  }
  printf("\n ##### CMaterialReference::Init got error material for %s in tex group %s",param_1,
         param_2);
LAB_00bd66f6:
  Init(this,pIVar2);
  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)