mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-26 14:01:02 +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);
|
CmdClearColorTarget(grp.renderTarget, cmd.clearColor, &rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cmd.numDrawSurfs <= 0)
|
if(cmd.numDrawSurfs <= 0 || !cmd.shouldDrawScene)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,6 +198,7 @@ void R_AddDrawSurfCmd( drawSurf_t* drawSurfs, int numDrawSurfs, int numTranspSur
|
||||||
Q_assert( cmd );
|
Q_assert( cmd );
|
||||||
|
|
||||||
qbool shouldClearColor = qfalse;
|
qbool shouldClearColor = qfalse;
|
||||||
|
qbool shouldDrawScene = qtrue;
|
||||||
vec4_t clearColor = { 0.0f, 0.0f, 0.0f, 1.0f };
|
vec4_t clearColor = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||||
if ( tr.refdef.rdflags & RDF_HYPERSPACE ) {
|
if ( tr.refdef.rdflags & RDF_HYPERSPACE ) {
|
||||||
const float c = RB_HyperspaceColor();
|
const float c = RB_HyperspaceColor();
|
||||||
|
@ -205,6 +206,7 @@ void R_AddDrawSurfCmd( drawSurf_t* drawSurfs, int numDrawSurfs, int numTranspSur
|
||||||
clearColor[1] = c;
|
clearColor[1] = c;
|
||||||
clearColor[2] = c;
|
clearColor[2] = c;
|
||||||
shouldClearColor = qtrue;
|
shouldClearColor = qtrue;
|
||||||
|
shouldDrawScene = qfalse;
|
||||||
} else if ( r_fastsky->integer && !(tr.refdef.rdflags & RDF_NOWORLDMODEL) ) {
|
} else if ( r_fastsky->integer && !(tr.refdef.rdflags & RDF_NOWORLDMODEL) ) {
|
||||||
shouldClearColor = qtrue;
|
shouldClearColor = qtrue;
|
||||||
} else if ( r_clear->integer ) {
|
} else if ( r_clear->integer ) {
|
||||||
|
@ -220,6 +222,7 @@ void R_AddDrawSurfCmd( drawSurf_t* drawSurfs, int numDrawSurfs, int numTranspSur
|
||||||
cmd->refdef = tr.refdef;
|
cmd->refdef = tr.refdef;
|
||||||
cmd->viewParms = tr.viewParms;
|
cmd->viewParms = tr.viewParms;
|
||||||
cmd->shouldClearColor = shouldClearColor;
|
cmd->shouldClearColor = shouldClearColor;
|
||||||
|
cmd->shouldDrawScene = shouldDrawScene;
|
||||||
Vector4Copy( clearColor, cmd->clearColor );
|
Vector4Copy( clearColor, cmd->clearColor );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1491,6 +1491,7 @@ struct drawSceneViewCommand_t : renderCommandBase_t {
|
||||||
int numTranspSurfs;
|
int numTranspSurfs;
|
||||||
drawSurf_t* drawSurfs;
|
drawSurf_t* drawSurfs;
|
||||||
qbool shouldClearColor;
|
qbool shouldClearColor;
|
||||||
|
qbool shouldDrawScene;
|
||||||
vec4_t clearColor;
|
vec4_t clearColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue