Skip to content

Commit f83347a

Browse files
committed
fixup: heatHaze
1 parent 8f7bf7b commit f83347a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/engine/renderer/tr_shader.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,13 +2649,6 @@ 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-
26592652
stage->type = stageType_t::ST_HEATHAZEMAP;
26602653
SetNormalFormat( stage, dxNormalFormat );
26612654
}
@@ -3284,6 +3277,13 @@ static bool ParseStage( shaderStage_t *stage, const char **text )
32843277
// compute state bits
32853278
stage->stateBits = colorMaskBits | depthMaskBits | blendSrcBits | blendDstBits | atestBits | depthFuncBits | polyModeBits;
32863279

3280+
// Do not load heatHaze maps when r_heatHaze is disabled.
3281+
if ( stage->type == stageType_t::ST_HEATHAZEMAP && !r_heatHaze->integer )
3282+
{
3283+
stage->active = false;
3284+
return true;
3285+
}
3286+
32873287
// load image
32883288
if ( loadMap && !LoadMap( stage, buffer, stage->type ) )
32893289
{

0 commit comments

Comments
 (0)