mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
no longer drawing the scene when in hyperspace
This commit is contained in:
parent
1258625810
commit
e52133ea5d
3 changed files with 5 additions and 1 deletions
|
@ -1045,7 +1045,7 @@ void World::DrawSceneView(const drawSceneViewCommand_t& cmd)
|
|||
CmdClearColorTarget(grp.renderTarget, cmd.clearColor, &rect);
|
||||
}
|
||||
|
||||
if(cmd.numDrawSurfs <= 0)
|
||||
if(cmd.numDrawSurfs <= 0 || !cmd.shouldDrawScene)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -198,6 +198,7 @@ void R_AddDrawSurfCmd( drawSurf_t* drawSurfs, int numDrawSurfs, int numTranspSur
|
|||
Q_assert( cmd );
|
||||
|
||||
qbool shouldClearColor = qfalse;
|
||||
qbool shouldDrawScene = qtrue;
|
||||
vec4_t clearColor = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
if ( tr.refdef.rdflags & RDF_HYPERSPACE ) {
|
||||
const float c = RB_HyperspaceColor();
|
||||
|
@ -205,6 +206,7 @@ void R_AddDrawSurfCmd( drawSurf_t* drawSurfs, int numDrawSurfs, int numTranspSur
|
|||
clearColor[1] = c;
|
||||
clearColor[2] = c;
|
||||
shouldClearColor = qtrue;
|
||||
shouldDrawScene = qfalse;
|
||||
} else if ( r_fastsky->integer && !(tr.refdef.rdflags & RDF_NOWORLDMODEL) ) {
|
||||
shouldClearColor = qtrue;
|
||||
} else if ( r_clear->integer ) {
|
||||
|
@ -220,6 +222,7 @@ void R_AddDrawSurfCmd( drawSurf_t* drawSurfs, int numDrawSurfs, int numTranspSur
|
|||
cmd->refdef = tr.refdef;
|
||||
cmd->viewParms = tr.viewParms;
|
||||
cmd->shouldClearColor = shouldClearColor;
|
||||
cmd->shouldDrawScene = shouldDrawScene;
|
||||
Vector4Copy( clearColor, cmd->clearColor );
|
||||
}
|
||||
|
||||
|
|
|
@ -1491,6 +1491,7 @@ struct drawSceneViewCommand_t : renderCommandBase_t {
|
|||
int numTranspSurfs;
|
||||
drawSurf_t* drawSurfs;
|
||||
qbool shouldClearColor;
|
||||
qbool shouldDrawScene;
|
||||
vec4_t clearColor;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue