mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Proper fix for Yavin sky
This commit is contained in:
parent
b942a64fc2
commit
96b8b4ebd5
5 changed files with 7 additions and 1 deletions
|
@ -92,6 +92,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
extern int skyboxportal;
|
||||
extern int drawskyboxportal;
|
||||
extern int hasskybox;
|
||||
|
||||
typedef byte color4ub_t[4];
|
||||
|
||||
|
|
|
@ -495,7 +495,8 @@ static void RB_BeginDrawingView (void) {
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( !( backEnd.refdef.rdflags & RDF_NOWORLDMODEL ) && !g_bRenderGlowingObjects )
|
||||
if ((!hasskybox || r_fastsky->integer) &&
|
||||
!( backEnd.refdef.rdflags & RDF_NOWORLDMODEL ) && !g_bRenderGlowingObjects )
|
||||
{
|
||||
if (tr.world && tr.world->globalFog != -1)
|
||||
{
|
||||
|
|
|
@ -1342,6 +1342,7 @@ void RE_LoadWorldMap_Actual( const char *name, world_t &worldData, int index ) {
|
|||
if (!index)
|
||||
{
|
||||
skyboxportal = 0;
|
||||
hasskybox = 0;
|
||||
|
||||
tr.sunDirection[0] = 0.45f;
|
||||
tr.sunDirection[1] = 0.3f;
|
||||
|
|
|
@ -42,6 +42,7 @@ int r_numpolyverts;
|
|||
|
||||
int skyboxportal;
|
||||
int drawskyboxportal;
|
||||
int hasskybox; // Used to indicate whether the BSP contains a skybox (if not, then use fog colour if applicable)
|
||||
|
||||
/*
|
||||
====================
|
||||
|
|
|
@ -845,6 +845,8 @@ void RB_StageIteratorSky( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
hasskybox = 1;
|
||||
|
||||
// go through all the polygons and project them onto
|
||||
// the sky box to see which blocks on each side need
|
||||
// to be drawn
|
||||
|
|
Loading…
Reference in a new issue