Skip to content

Commit 8f7bf7b

Browse files
committed
tr_shader: do not load heatHaze map when heatHaze is disabled
1 parent 6ec7fb3 commit 8f7bf7b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/engine/renderer/tr_shader.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2649,6 +2649,13 @@ static bool ParseStage( shaderStage_t *stage, const char **text )
26492649
}
26502650
else if ( !Q_stricmp( token, "heathazeMap" ) )
26512651
{
2652+
// Do not load heatHaze maps when r_heatHaze is disabled.
2653+
if ( !r_heatHaze->integer )
2654+
{
2655+
stage->active = false;
2656+
return true;
2657+
}
2658+
26522659
stage->type = stageType_t::ST_HEATHAZEMAP;
26532660
SetNormalFormat( stage, dxNormalFormat );
26542661
}
@@ -5181,7 +5188,6 @@ static void FinishStages()
51815188
switch ( stage->type )
51825189
{
51835190
case stageType_t::ST_HEATHAZEMAP:
5184-
stage->active = r_heatHaze->integer;
51855191
stage->stateBits &= ~( GLS_ATEST_BITS | GLS_DEPTHMASK_TRUE );
51865192
break;
51875193

0 commit comments

Comments
 (0)