//2. Whitewall hack
if (cvar.whitewall)
{
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
}
//End of Whitewall hack
//3. NightMode hack
if (cvar.nightmode)
if ( mode != GL_TRIANGLES && mode != GL_TRIANGLE_STRIP && mode != GL_TRIANGLE_FAN && mode != GL_QUADS )
{
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);
}
// End of NightMode hack
//4. Special Wallhack
if (cvar.wall)
if(!(mode==GL_TRIANGLES||mode==GL_TRIANGLE_STRIP||mode==GL_TRIANGLE_FAN||mode==GL_QUADS))
{
GLfloat curcol[4];
glGetFloatv(GL_CURRENT_COLOR, curcol);
glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(curcol[0],curcol[1],curcol[2],0.5f);
glClearColor(0.0f,0.0f,0.0f,0.0f);
}