|
|
@ -758,7 +758,7 @@ void DrawGLPoly( glpoly_t *p, float xScale, float yScale ) |
|
|
|
float flRate, flAngle; |
|
|
|
float flRate, flAngle; |
|
|
|
gl_texture_t *texture; |
|
|
|
gl_texture_t *texture; |
|
|
|
|
|
|
|
|
|
|
|
if( ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ) && RI.currententity == gEngfuncs.GetEntityByIndex( 0 ) ) |
|
|
|
if( ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ) && RI.currententity == CL_GetEntityByIndex( 0 )) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// same as doom speed
|
|
|
|
// same as doom speed
|
|
|
|
flConveyorSpeed = -35.0f; |
|
|
|
flConveyorSpeed = -35.0f; |
|
|
@ -1235,7 +1235,7 @@ void R_DrawTextureChains( void ) |
|
|
|
GL_SetupFogColorForSurfaces(); |
|
|
|
GL_SetupFogColorForSurfaces(); |
|
|
|
|
|
|
|
|
|
|
|
// restore worldmodel
|
|
|
|
// restore worldmodel
|
|
|
|
RI.currententity = gEngfuncs.GetEntityByIndex( 0 ); |
|
|
|
RI.currententity = CL_GetEntityByIndex( 0 ); |
|
|
|
RI.currentmodel = RI.currententity->model; |
|
|
|
RI.currentmodel = RI.currententity->model; |
|
|
|
|
|
|
|
|
|
|
|
if( ENGINE_GET_PARM( PARM_SKY_SPHERE ) ) |
|
|
|
if( ENGINE_GET_PARM( PARM_SKY_SPHERE ) ) |
|
|
@ -1266,7 +1266,7 @@ void R_DrawTextureChains( void ) |
|
|
|
if( !s || ( i == tr.skytexturenum )) |
|
|
|
if( !s || ( i == tr.skytexturenum )) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
if(( s->flags & SURF_DRAWTURB ) && MOVEVARS->wateralpha < 1.0f ) |
|
|
|
if(( s->flags & SURF_DRAWTURB ) && tr.movevars->wateralpha < 1.0f ) |
|
|
|
continue; // draw translucent water later
|
|
|
|
continue; // draw translucent water later
|
|
|
|
|
|
|
|
|
|
|
|
if( ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ) && FBitSet( s->flags, SURF_TRANSPARENT )) |
|
|
|
if( ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ) && FBitSet( s->flags, SURF_TRANSPARENT )) |
|
|
@ -1309,7 +1309,7 @@ void R_DrawAlphaTextureChains( void ) |
|
|
|
GL_SetupFogColorForSurfaces(); |
|
|
|
GL_SetupFogColorForSurfaces(); |
|
|
|
|
|
|
|
|
|
|
|
// restore worldmodel
|
|
|
|
// restore worldmodel
|
|
|
|
RI.currententity = gEngfuncs.GetEntityByIndex( 0 ); |
|
|
|
RI.currententity = CL_GetEntityByIndex( 0 ); |
|
|
|
RI.currentmodel = RI.currententity->model; |
|
|
|
RI.currentmodel = RI.currententity->model; |
|
|
|
RI.currententity->curstate.rendermode = kRenderTransAlpha; |
|
|
|
RI.currententity->curstate.rendermode = kRenderTransAlpha; |
|
|
|
draw_alpha_surfaces = false; |
|
|
|
draw_alpha_surfaces = false; |
|
|
@ -1350,11 +1350,11 @@ void R_DrawWaterSurfaces( void ) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
// non-transparent water is already drawed
|
|
|
|
// non-transparent water is already drawed
|
|
|
|
if( MOVEVARS->wateralpha >= 1.0f ) |
|
|
|
if( tr.movevars->wateralpha >= 1.0f ) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
// restore worldmodel
|
|
|
|
// restore worldmodel
|
|
|
|
RI.currententity = gEngfuncs.GetEntityByIndex( 0 ); |
|
|
|
RI.currententity = CL_GetEntityByIndex( 0 ); |
|
|
|
RI.currentmodel = RI.currententity->model; |
|
|
|
RI.currentmodel = RI.currententity->model; |
|
|
|
|
|
|
|
|
|
|
|
// go back to the world matrix
|
|
|
|
// go back to the world matrix
|
|
|
@ -1365,7 +1365,7 @@ void R_DrawWaterSurfaces( void ) |
|
|
|
pglDisable( GL_ALPHA_TEST ); |
|
|
|
pglDisable( GL_ALPHA_TEST ); |
|
|
|
pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); |
|
|
|
pglBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); |
|
|
|
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); |
|
|
|
pglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); |
|
|
|
pglColor4f( 1.0f, 1.0f, 1.0f, MOVEVARS->wateralpha ); |
|
|
|
pglColor4f( 1.0f, 1.0f, 1.0f, tr.movevars->wateralpha ); |
|
|
|
|
|
|
|
|
|
|
|
for( i = 0; i < WORLDMODEL->numtextures; i++ ) |
|
|
|
for( i = 0; i < WORLDMODEL->numtextures; i++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -3280,7 +3280,7 @@ void R_DrawWorld( void ) |
|
|
|
|
|
|
|
|
|
|
|
// paranoia issues: when gl_renderer is "0" we need have something valid for currententity
|
|
|
|
// paranoia issues: when gl_renderer is "0" we need have something valid for currententity
|
|
|
|
// to prevent crashing until HeadShield drawing.
|
|
|
|
// to prevent crashing until HeadShield drawing.
|
|
|
|
RI.currententity = gEngfuncs.GetEntityByIndex( 0 ); |
|
|
|
RI.currententity = CL_GetEntityByIndex( 0 ); |
|
|
|
if( !RI.currententity ) |
|
|
|
if( !RI.currententity ) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
@ -3490,7 +3490,7 @@ void GL_RebuildLightmaps( void ) |
|
|
|
|
|
|
|
|
|
|
|
for( i = 0; i < ENGINE_GET_PARM( PARM_NUMMODELS ); i++ ) |
|
|
|
for( i = 0; i < ENGINE_GET_PARM( PARM_NUMMODELS ); i++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(( m = gEngfuncs.pfnGetModelByIndex( i + 1 )) == NULL ) |
|
|
|
if(( m = CL_ModelHandle( i + 1 )) == NULL ) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
if( m->name[0] == '*' || m->type != mod_brush ) |
|
|
|
if( m->name[0] == '*' || m->type != mod_brush ) |
|
|
@ -3554,7 +3554,7 @@ void GL_BuildLightmaps( void ) |
|
|
|
|
|
|
|
|
|
|
|
for( i = 0; i < ENGINE_GET_PARM( PARM_NUMMODELS ); i++ ) |
|
|
|
for( i = 0; i < ENGINE_GET_PARM( PARM_NUMMODELS ); i++ ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if(( m = gEngfuncs.pfnGetModelByIndex( i + 1 )) == NULL ) |
|
|
|
if(( m = CL_ModelHandle( i + 1 )) == NULL ) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
if( m->name[0] == '*' || m->type != mod_brush ) |
|
|
|
if( m->name[0] == '*' || m->type != mod_brush ) |
|
|
|