mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
z-fighting (flickering gl texture clash most notable in e1m1) bug fix, from Sander.
git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@480 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
2713633423
commit
5a6a9c30d1
5 changed files with 22 additions and 3 deletions
|
@ -103,6 +103,8 @@ cvar_t r_nolerp_list = {"r_nolerp_list", "progs/flame.mdl,progs/flame2.mdl,progs
|
|||
extern cvar_t r_vfog;
|
||||
//johnfitz
|
||||
|
||||
cvar_t gl_zfix = {"gl_zfix", "1", true}; // QuakeSpasm z-fighting fix
|
||||
|
||||
qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
|
||||
|
||||
/*
|
||||
|
|
|
@ -45,6 +45,8 @@ extern cvar_t r_lerpmove;
|
|||
extern cvar_t r_nolerp_list;
|
||||
//johnfitz
|
||||
|
||||
extern cvar_t gl_zfix; // QuakeSpasm z-fighting fix
|
||||
|
||||
extern float load_subdivide_size; //johnfitz -- remember what subdivide_size value was when this map was loaded
|
||||
|
||||
extern cvar_t gl_subdivide_size; //johnfitz -- moved here from gl_model.c
|
||||
|
@ -240,6 +242,8 @@ void R_Init (void)
|
|||
Cvar_RegisterVariable (&r_nolerp_list, R_NoLerpList_f);
|
||||
//johnfitz
|
||||
|
||||
Cvar_RegisterVariable (&gl_zfix, NULL); // QuakeSpasm z-fighting fix
|
||||
|
||||
Cvar_RegisterVariable (&gl_subdivide_size, NULL); //johnfitz -- moved here from gl_model.c
|
||||
|
||||
R_InitParticles ();
|
||||
|
|
|
@ -73,6 +73,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#define ON_EPSILON 0.1 // point on plane side epsilon
|
||||
|
||||
#define DIST_EPSILON (0.03125) // 1/32 epsilon to keep floating point happy (moved from world.c)
|
||||
|
||||
#define MAX_MSGLEN 32000 // max length of a reliable message //johnfitz -- was 8000
|
||||
#define MAX_DATAGRAM 32000 // max length of unreliable message //johnfitz -- was 1024
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
extern cvar_t gl_fullbrights, r_drawflat, gl_overbright, r_oldwater; //johnfitz
|
||||
|
||||
extern cvar_t gl_zfix; // QuakeSpasm z-fighting fix
|
||||
|
||||
int gl_lightmap_format;
|
||||
int lightmap_bytes;
|
||||
|
||||
|
@ -543,7 +545,19 @@ void R_DrawBrushModel (entity_t *e)
|
|||
|
||||
glPushMatrix ();
|
||||
e->angles[0] = -e->angles[0]; // stupid quake bug
|
||||
if (gl_zfix.value)
|
||||
{
|
||||
e->origin[0] -= DIST_EPSILON;
|
||||
e->origin[1] -= DIST_EPSILON;
|
||||
e->origin[2] -= DIST_EPSILON;
|
||||
}
|
||||
R_RotateForEntity (e->origin, e->angles);
|
||||
if (gl_zfix.value)
|
||||
{
|
||||
e->origin[0] += DIST_EPSILON;
|
||||
e->origin[1] += DIST_EPSILON;
|
||||
e->origin[2] += DIST_EPSILON;
|
||||
}
|
||||
e->angles[0] = -e->angles[0]; // stupid quake bug
|
||||
|
||||
//
|
||||
|
|
|
@ -556,9 +556,6 @@ LINE TESTING IN HULLS
|
|||
===============================================================================
|
||||
*/
|
||||
|
||||
// 1/32 epsilon to keep floating point happy
|
||||
#define DIST_EPSILON (0.03125)
|
||||
|
||||
/*
|
||||
==================
|
||||
SV_RecursiveHullCheck
|
||||
|
|
Loading…
Reference in a new issue