Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void HandChams(void* thisptr, void* edx, DrawModelResults_t *pResults, const DrawModelInfo_t& info, matrix3x4_t *pBoneToWorld, float *pFlexWeights, float *pFlexDelayedWeights, const Vector &modelOrigin, int flags)
- {
- if (!g_pSettings->VisualsArmChams->SelectedIndex)
- return;
- Color col = Color(g_pSettings->ColorHands->color);
- Color col_wireframe = Color(col.r() * 0.8, col.g() * 0.8, col.b() * 0.8);
- switch (g_pSettings->VisualsArmChams->SelectedIndex) /* there must be a better more optimized way to do this? */
- {
- case 0: //wtf
- return; break;
- case 1: // textured
- {
- Interfaces->StudioRender->SetColorModulation(col.Base());
- Interfaces->StudioRender->SetAlphaModulation(1.0f);
- Interfaces->StudioRender->ForcedMaterialOverride(g_pMaterialHelper->OpenLit);
- }break;
- case 2: // material
- {
- /*IMaterial* skins[MAXSTUDIOSKINS];
- CBaseEntity* model_entity = reinterpret_cast<CBaseEntity*>(info.m_pClientEntity);
- if (!model_entity)
- return;
- studiohdr_t* hdr = Interfaces->ModelInfo->GetStudioModel(model_entity->GetModel());
- Interfaces->ModelInfo->GetModelMaterials(model_entity->GetModel(), hdr->numtextures, skins);
- for (auto i = 0; i < hdr->numtextures; ++i)
- {
- if (!skins[i])
- {
- continue;
- }
- skins[i]->ColorModulate(col.rBase(), col.gBase(), col.bBase());
- skins[i]->AlphaModulate(col.aBase());
- }
- oDrawHuso(thisptr, pResults, info, pBoneToWorld, pFlexWeights, pFlexDelayedWeights, modelOrigin, flags);
- for (auto i = 0; i < hdr->numtextures; ++i)
- {
- if (!skins[i])
- {
- continue;
- }
- skins[i]->ColorModulate(1.0f, 1.0f, 1.0f);
- skins[i]->AlphaModulate(1.0f);
- }*/
- }break;
- case 3: // flat
- {
- Interfaces->StudioRender->SetColorModulation(col.Base());
- Interfaces->StudioRender->SetAlphaModulation(1.0f);
- Interfaces->StudioRender->ForcedMaterialOverride(g_pMaterialHelper->OpenFlat);
- }break;
- case 4: // golden
- {
- static IMaterial* gold = Interfaces->MaterialSystem->FindMaterial("models/inventory_items/trophy_majors/gold", TEXTURE_GROUP_OTHER);
- Interfaces->StudioRender->ForcedMaterialOverride(gold);
- oDrawHuso(thisptr, pResults, info, pBoneToWorld, pFlexWeights, pFlexDelayedWeights, modelOrigin, flags);
- }break;
- case 5: // glass
- {
- static IMaterial* glass = Interfaces->MaterialSystem->FindMaterial("models/inventory_items/cologne_prediction/cologne_prediction_glass", TEXTURE_GROUP_OTHER);
- Interfaces->StudioRender->SetAlphaModulation(1.0f);
- Interfaces->StudioRender->ForcedMaterialOverride(glass);
- oDrawHuso(thisptr, pResults, info, pBoneToWorld, pFlexWeights, pFlexDelayedWeights, modelOrigin, flags);
- }break;
- }
- if (g_pSettings->VisualsArmWireframe->Checked)
- {
- oDrawHuso(thisptr, pResults, info, pBoneToWorld, pFlexWeights, pFlexDelayedWeights, modelOrigin, flags);
- Interfaces->StudioRender->SetColorModulation(col_wireframe.Base());
- Interfaces->StudioRender->SetAlphaModulation(1.0f);
- Interfaces->StudioRender->ForcedMaterialOverride(g_pMaterialHelper->AddWire);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement