Skip to content

Commit

Permalink
renderer: do b = condition instead of if (!condition) b = false
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Apr 23, 2024
1 parent c75bcc0 commit f1e65a7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/engine/renderer/tr_shader.cpp
Expand Up @@ -5185,10 +5185,7 @@ static void FinishStages()

case stageType_t::ST_REFLECTIONMAP:
case stageType_t::ST_COLLAPSE_REFLECTIONMAP:
if ( !r_reflectionMapping->integer )
{
stage->active = false;
}
stage->active = (bool) r_reflectionMapping->integer;
break;

case stageType_t::ST_STYLELIGHTMAP:
Expand All @@ -5211,10 +5208,7 @@ static void FinishStages()

case stageType_t::ST_ATTENUATIONMAP_XY:
case stageType_t::ST_ATTENUATIONMAP_Z:
if ( !glConfig2.dynamicLight || r_dynamicLightRenderer.Get() != Util::ordinal( dynamicLightRenderer_t::LEGACY ) )
{
stage->active = false;
}
stage->active = ( glConfig2.dynamicLight && r_dynamicLightRenderer.Get() != Util::ordinal( dynamicLightRenderer_t::LEGACY ) )
break;

default:
Expand Down

0 comments on commit f1e65a7

Please sign in to comment.