mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +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 planenum, side;
|
||||||
int ti;
|
int ti;
|
||||||
|
|
||||||
|
cvar_t* gl_fixsurfsky = ri.Cvar_Get("gl_fixsurfsky", "0", CVAR_ARCHIVE);
|
||||||
|
|
||||||
in = (void *)(mod_base + l->fileofs);
|
in = (void *)(mod_base + l->fileofs);
|
||||||
|
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
|
@ -655,10 +657,13 @@ Mod_LoadFaces(lump_t *l)
|
||||||
R_SubdivideSurface(out); /* cut up polygon for warps */
|
R_SubdivideSurface(out); /* cut up polygon for warps */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gl_fixsurfsky->value)
|
||||||
|
{
|
||||||
if (out->texinfo->flags & SURF_SKY)
|
if (out->texinfo->flags & SURF_SKY)
|
||||||
{
|
{
|
||||||
out->flags |= SURF_DRAWSKY;
|
out->flags |= SURF_DRAWSKY;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* create lightmaps and polygons */
|
/* create lightmaps and polygons */
|
||||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANS33 | SURF_TRANS66 | SURF_WARP)))
|
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANS33 | SURF_TRANS66 | SURF_WARP)))
|
||||||
|
|
|
@ -463,6 +463,8 @@ Mod_LoadFaces(lump_t *l)
|
||||||
int planenum, side;
|
int planenum, side;
|
||||||
int ti;
|
int ti;
|
||||||
|
|
||||||
|
cvar_t* gl_fixsurfsky = ri.Cvar_Get("gl_fixsurfsky", "0", CVAR_ARCHIVE);
|
||||||
|
|
||||||
in = (void *)(mod_base + l->fileofs);
|
in = (void *)(mod_base + l->fileofs);
|
||||||
|
|
||||||
if (l->filelen % sizeof(*in))
|
if (l->filelen % sizeof(*in))
|
||||||
|
@ -541,10 +543,13 @@ Mod_LoadFaces(lump_t *l)
|
||||||
GL3_SubdivideSurface(out, loadmodel); /* cut up polygon for warps */
|
GL3_SubdivideSurface(out, loadmodel); /* cut up polygon for warps */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gl_fixsurfsky->value)
|
||||||
|
{
|
||||||
if (out->texinfo->flags & SURF_SKY)
|
if (out->texinfo->flags & SURF_SKY)
|
||||||
{
|
{
|
||||||
out->flags |= SURF_DRAWSKY;
|
out->flags |= SURF_DRAWSKY;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* create lightmaps and polygons */
|
/* create lightmaps and polygons */
|
||||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANS33 | SURF_TRANS66 | SURF_WARP)))
|
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANS33 | SURF_TRANS66 | SURF_WARP)))
|
||||||
|
|
Loading…
Reference in a new issue