void AsusWalls(bool Variables,float alha)
{
bool switcher = false;
for (MaterialHandle_t i = I::MaterialSystem->FirstMaterial(); i != I::MaterialSystem->InvalidMaterial(); i = I::MaterialSystem->NextMaterial(i))
{
IMaterial *pMaterial = I::MaterialSystem->GetMaterial(i);
if (!pMaterial)
continue;
if (strstr(pMaterial->GetTextureGroupName(), charenc("World")) && Variables == true)
switcher = true;
else if (strstr(pMaterial->GetTextureGroupName(), charenc("World")) && Variables == false)
{
switcher = false;
alha = 1.f;
}
pMaterial->AlphaModulate(alha);
pMaterial->SetMaterialVarFlag(MATERIAL_VAR_OPAQUETEXTURE, switcher);
pMaterial->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, switcher);
}
}