Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1.  
  2. IMaterial *mats[32];
  3. studiohdr_t* hdr = Interface.ModelInfo->GetStudiomodel(pInfo.pModel);
  4. Interface.ModelInfo->GetModelMaterials(pInfo.pModel, hdr->numtextures, mats);
  5. for (int m = 0; m < 2; m++)
  6. {
  7. bool ignore = m == 0;
  8. if (ignore && Options::Visuals::Chams::VisibleOnly)
  9. continue;
  10.  
  11. for (int i = 0; i < hdr->numtextures; i++)
  12. {
  13. IMaterial* mat = mats[i];
  14. if (!mat)
  15. break;
  16.  
  17. mat->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, ignore);
  18.  
  19. O::DrawModelExecute(thisptr, matctx, state, pInfo, pCustomBoneToWorld);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement