-------------in glBegin
#1
if(mode == GL_TRIANGLE_STRIP ||mode == GL_TRIANGLE_FAN)
{
cl_entity_s * curent= enginestudio->GetCurrentEntity();
if(curent)
{
if(curent->player)
{
glDisable(GL_DEPTH_TEST);
}
else
{
glEnable(GL_DEPTH_TEST);
}
}
else
{
glEnable(GL_DEPTH_TEST);
}
}
else
{
glEnable(GL_DEPTH_TEST);
}
}
-----------------------
#2
in glBegin
if(pstudio->GetCurrentEntity())
{
cl_entity_s *ent=pstudio->GetCurrentEntity();
if(cvar.wall) {
if(ent->player) glDisable(GL_DEPTH_TEST);
else if(mode==GL_TRIANGLES||mode==GL_POLYGON) glEnable(GL_DEPTH_TEST);
}
}