L L4D2node

CSheetExtended::LoadFromMaterial

0x00bdf880 · 191 bytes · __thiscall

_ZN14CSheetExtended16LoadFromMaterialEP9IMaterial

Decompiled

undefined (2 params)

/* CSheetExtended::LoadFromMaterial(IMaterial*) */

void __thiscall CSheetExtended::LoadFromMaterial(CSheetExtended *this,IMaterial *param_1)

{
  char cVar1;
  int *piVar2;
  void *pvVar3;
  char local_49;
  int local_48;
  CUtlBuffer local_44 [56];
  
  if (param_1 != (IMaterial *)0x0) {
    local_49 = '\0';
    piVar2 = (int *)(**(code **)(*(int *)param_1 + 0x2c))(param_1,"$basetexture",&local_49,1);
    if ((piVar2 != (int *)0x0) && (local_49 != '\0')) {
      cVar1 = (**(code **)(*piVar2 + 0x44))(piVar2);
      if (cVar1 != '\0') {
        piVar2 = (int *)(**(code **)*piVar2)(piVar2);
        if (piVar2 != (int *)0x0) {
          cVar1 = (**(code **)(*piVar2 + 0x3c))(piVar2);
          if (cVar1 == '\0') {
            pvVar3 = (void *)(**(code **)(*piVar2 + 0x24))(piVar2,0x10,&local_48);
            if (pvVar3 != (void *)0x0) {
              CUtlBuffer::CUtlBuffer(local_44,pvVar3,local_48,8);
                    /* try { // try from 00bdf930 to 00bdf934 has its CatchHandler @ 00bdf942 */
              LoadFromBuffer(this,local_44);
              CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_44);
            }
          }
        }
      }
    }
  }
  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)