mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-31 13:20:34 +00:00
Make the SURF_DRAWSKY fix committed in 325e893
optional.
The developers tested their maps without the fix and decided that it looked good. Add a new cvar gl_fixsurfsky defaulting to 0 that enables the fix if someone really want it.
This commit is contained in:
parent
325e893376
commit
401ec04691
2 changed files with 14 additions and 4 deletions
|
@ -577,6 +577,8 @@ Mod_LoadFaces(lump_t *l)
|
|||
int planenum, side;
|
||||
int ti;
|
||||
|
||||
cvar_t* gl_fixsurfsky = ri.Cvar_Get("gl_fixsurfsky", "0", CVAR_ARCHIVE);
|
||||
|
||||
in = (void *)(mod_base + l->fileofs);
|
||||
|
||||
if (l->filelen % sizeof(*in))
|
||||
|
@ -655,9 +657,12 @@ Mod_LoadFaces(lump_t *l)
|
|||
R_SubdivideSurface(out); /* cut up polygon for warps */
|
||||
}
|
||||
|
||||
if (out->texinfo->flags & SURF_SKY)
|
||||
if (gl_fixsurfsky->value)
|
||||
{
|
||||
out->flags |= SURF_DRAWSKY;
|
||||
if (out->texinfo->flags & SURF_SKY)
|
||||
{
|
||||
out->flags |= SURF_DRAWSKY;
|
||||
}
|
||||
}
|
||||
|
||||
/* create lightmaps and polygons */
|
||||
|
|
|
@ -463,6 +463,8 @@ Mod_LoadFaces(lump_t *l)
|
|||
int planenum, side;
|
||||
int ti;
|
||||
|
||||
cvar_t* gl_fixsurfsky = ri.Cvar_Get("gl_fixsurfsky", "0", CVAR_ARCHIVE);
|
||||
|
||||
in = (void *)(mod_base + l->fileofs);
|
||||
|
||||
if (l->filelen % sizeof(*in))
|
||||
|
@ -541,9 +543,12 @@ Mod_LoadFaces(lump_t *l)
|
|||
GL3_SubdivideSurface(out, loadmodel); /* cut up polygon for warps */
|
||||
}
|
||||
|
||||
if (out->texinfo->flags & SURF_SKY)
|
||||
if (gl_fixsurfsky->value)
|
||||
{
|
||||
out->flags |= SURF_DRAWSKY;
|
||||
if (out->texinfo->flags & SURF_SKY)
|
||||
{
|
||||
out->flags |= SURF_DRAWSKY;
|
||||
}
|
||||
}
|
||||
|
||||
/* create lightmaps and polygons */
|
||||
|
|
Loading…
Reference in a new issue