L L4D2node

CModelInfo::IsUsingFBTexture

0x00193d20 · 401 bytes · __thiscall

_ZNK10CModelInfo16IsUsingFBTextureEPK7model_tiiPv

Decompiled

undefined (5 params)

/* CModelInfo::IsUsingFBTexture(model_t const*, int, int, void*) const */

undefined4 __thiscall
CModelInfo::IsUsingFBTexture
          (CModelInfo *this,model_t *param_1,int param_2,int param_3,void *param_4)

{
  int *piVar1;
  int iVar2;
  int *piVar3;
  undefined4 uVar4;
  int iVar5;
  int local_21c [131];
  
  if ((param_1 != (model_t *)0x0) && (((byte)param_1[0x115] & 1) != 0)) {
    if (*(int *)(param_1 + 0x110) == 1) {
      if (0 < *(int *)(param_1 + 0x13c)) {
        iVar2 = 0;
        do {
          piVar3 = *(int **)((uint)(*(ushort *)
                                     ((*(int *)(param_1 + 0x138) + iVar2) * 0x20 +
                                      *(int *)(*(int *)(param_1 + 0x134) + 0x78) + 0x16) >> 1) *
                             0x50 + *(int *)(*(int *)(param_1 + 0x134) + 0x5c) + 0x4c);
          if ((piVar3 != (int *)0x0) &&
             (uVar4 = (**(code **)(*piVar3 + 0x60))(piVar3,1), (char)uVar4 != '\0')) {
            return uVar4;
          }
          iVar2 = iVar2 + 1;
        } while (iVar2 < *(int *)(param_1 + 0x13c));
      }
    }
    else if (*(int *)(param_1 + 0x110) == 3) {
      iVar2 = (**(code **)(*g_pStudioRender + 0xa4))
                        (g_pStudioRender,*(undefined2 *)(param_1 + 0x134),param_2,param_3,0x80,
                         local_21c);
      if (0 < iVar2) {
        iVar5 = 0;
        do {
          if (local_21c[iVar5] != 0) {
            piVar3 = (int *)(**(code **)(*g_pMaterialSystem + 0x180))(g_pMaterialSystem);
            if (piVar3 != (int *)0x0) {
                    /* try { // try from 00193dd2 to 00193dd4 has its CatchHandler @ 00193ee1 */
              (**(code **)(*piVar3 + 8))(piVar3);
            }
                    /* try { // try from 00193de8 to 00193dfd has its CatchHandler @ 00193ec7 */
            (**(code **)(*piVar3 + 0x24))(piVar3,local_21c[iVar5],param_4);
            piVar1 = (int *)local_21c[iVar5];
            uVar4 = (**(code **)(*piVar1 + 0x60))(piVar1,1);
            if ((char)uVar4 != '\0') {
              (**(code **)(*piVar3 + 0xc))(piVar3);
              (**(code **)(*piVar3 + 4))(piVar3);
              return uVar4;
            }
            (**(code **)(*piVar3 + 0xc))(piVar3);
            (**(code **)(*piVar3 + 4))(piVar3);
          }
          iVar5 = iVar5 + 1;
        } while (iVar5 != iVar2);
      }
    }
  }
  return 0;
}

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)