mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-01 05:35:49 +01:00
ref: gl: restore usage of FWORLD_CUSTOM_SKYBOX flag, do direct checks instead of PARM check, remove unused tr.fCustomSkybox
This commit is contained in:
parent
f12df54226
commit
0132eb6e44
@ -34,6 +34,7 @@ GNU General Public License for more details.
|
||||
#include "common/cvar.h"
|
||||
#include "gl_export.h"
|
||||
#include "wadfile.h"
|
||||
#include "common/mod_local.h"
|
||||
|
||||
#if XASH_PSVITA
|
||||
int VGL_ShimInit( void );
|
||||
@ -252,10 +253,8 @@ typedef struct
|
||||
// cull info
|
||||
vec3_t modelorg; // relative to viewpoint
|
||||
|
||||
qboolean fCustomSkybox;
|
||||
|
||||
// get from engine
|
||||
struct world_static_s *world;
|
||||
world_static_t *world;
|
||||
cl_entity_t *entities;
|
||||
movevars_t *movevars;
|
||||
color24 *palette;
|
||||
|
@ -1300,7 +1300,7 @@ void R_DrawTextureChains( void )
|
||||
RI.currententity = CL_GetEntityByIndex( 0 );
|
||||
RI.currentmodel = RI.currententity->model;
|
||||
|
||||
if( ENGINE_GET_PARM( PARM_SKY_SPHERE ) )
|
||||
if( FBitSet( tr.world->flags, FWORLD_SKYSPHERE ) && !FBitSet( tr.world->flags, FWORLD_CUSTOM_SKYBOX ))
|
||||
{
|
||||
pglDisable( GL_TEXTURE_2D );
|
||||
pglColor3f( 1.0f, 1.0f, 1.0f );
|
||||
@ -1310,7 +1310,7 @@ void R_DrawTextureChains( void )
|
||||
for( s = skychain; s != NULL; s = s->texturechain )
|
||||
R_AddSkyBoxSurface( s );
|
||||
|
||||
if( ENGINE_GET_PARM( PARM_SKY_SPHERE ) )
|
||||
if( FBitSet( tr.world->flags, FWORLD_SKYSPHERE ) && !FBitSet( tr.world->flags, FWORLD_CUSTOM_SKYBOX ))
|
||||
{
|
||||
pglEnable( GL_TEXTURE_2D );
|
||||
if( skychain )
|
||||
|
@ -332,7 +332,7 @@ void R_AddSkyBoxSurface( msurface_t *fa )
|
||||
float *v;
|
||||
int i;
|
||||
|
||||
if( ENGINE_GET_PARM( PARM_SKY_SPHERE ) && fa->polys && !tr.fCustomSkybox )
|
||||
if( FBitSet( tr.world->flags, FWORLD_SKYSPHERE ) && fa->polys && !FBitSet( tr.world->flags, FWORLD_CUSTOM_SKYBOX ))
|
||||
{
|
||||
glpoly_t *p = fa->polys;
|
||||
|
||||
@ -376,7 +376,7 @@ void R_UnloadSkybox( void )
|
||||
tr.skyboxbasenum = SKYBOX_BASE_NUM; // set skybox base (to let some mods load hi-res skyboxes)
|
||||
|
||||
memset( tr.skyboxTextures, 0, sizeof( tr.skyboxTextures ));
|
||||
tr.fCustomSkybox = false;
|
||||
ClearBits( tr.world->flags, FWORLD_CUSTOM_SKYBOX );
|
||||
}
|
||||
|
||||
/*
|
||||
@ -478,7 +478,7 @@ void R_SetupSky( const char *skyboxname )
|
||||
|
||||
if( i == 6 )
|
||||
{
|
||||
tr.fCustomSkybox = true;
|
||||
SetBits( tr.world->flags, FWORLD_CUSTOM_SKYBOX );
|
||||
gEngfuncs.Con_DPrintf( "done\n" );
|
||||
return; // loaded
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user