0mg
No notes
Syntax:
No syntax
if(Cvars.xqz==1)
{
IMaterial* Material = NULL;
char * name; char * group;
for(int i=HalFLife2.m_pMaterialSystem->FirstMaterial(); i < HalFLife2.m_pMaterialSystem->GetNumMaterials(); i++)
{
Material = HalFLife2.m_pMaterialSystem->GetMaterial(i);
name = (char*) Material->GetName();
group = (char*) Material->GetTextureGroupName();
/* perfect xqz */
if(strstr( name, "player" ) || strstr( name, "w_models" ) || strstr( name, "hostage" ))
{
Material->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, true );
Material->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, true );
Material->SetMaterialVarFlag( MATERIAL_VAR_FLAT, true );
}
/* fps boost by removing useless textures */
if(strstr( name, "Lightmaps" ) || strstr( name, "Particle textures" ) || strstr( name, "Decal textures" ) || strstr( name, "CubeMap textures" ) || strstr( name, "Dynamic Indices" ) || strstr( name, "Dynamic Verts" ) || strstr( name, "World Verts" ) || strstr( name, "Lighting Verts" ))
Material->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, true );
}
}
else if (Cvars.xqz==0)
{
IMaterial* Material = NULL;
char * name; char * group;
for(int i=HalFLife2.m_pMaterialSystem->FirstMaterial(); i < HalFLife2.m_pMaterialSystem->GetNumMaterials(); i++)
{
Material = HalFLife2.m_pMaterialSystem->GetMaterial(i);
name = (char*) Material->GetName();
group = (char*) Material->GetTextureGroupName();
/* perfect xqz */
if(strstr( name, "player" ) || strstr( name, "w_models" ) || strstr( name, "hostage" ))
{
Material->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, false );
Material->SetMaterialVarFlag( MATERIAL_VAR_ZNEARER, false );
Material->SetMaterialVarFlag( MATERIAL_VAR_FLAT, false );
}
/* fps boost by removing useless textures */
if(strstr( name, "Lightmaps" ) || strstr( name, "Particle textures" ) || strstr( name, "Decal textures" ) || strstr( name, "CubeMap textures" ) || strstr( name, "Dynamic Indices" ) || strstr( name, "Dynamic Verts" ) || strstr( name, "World Verts" ) || strstr( name, "Lighting Verts" ))
Material->SetMaterialVarFlag( MATERIAL_VAR_NO_DRAW, false );
}
}