Skip to content

Commit

Permalink
tr_shade: move a boolean in the block it belongs to
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Apr 26, 2020
1 parent 6607ad5 commit d07f176
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/renderer/tr_shade.cpp
Expand Up @@ -726,8 +726,6 @@ static void Render_lightMapping( int stage )
&& (tess.surfaceShader->surfaceFlags & SURF_NOLIGHTMAP)
&& !(tess.numSurfaceStages > 0 && tess.surfaceStages[0]->rgbGen == colorGen_t::CGEN_VERTEX);

bool isWorldEntity = backEnd.currentEntity == &tr.worldEntity;

uint32_t stateBits = pStage->stateBits;

if ( enableLightMapping && r_showLightMaps->integer )
Expand Down Expand Up @@ -950,6 +948,8 @@ static void Render_lightMapping( int stage )
cubemapProbe_t *cubeProbeNearest;
cubemapProbe_t *cubeProbeSecondNearest;

bool isWorldEntity = backEnd.currentEntity == &tr.worldEntity;

if ( backEnd.currentEntity && !isWorldEntity )
{
R_FindTwoNearestCubeMaps( backEnd.currentEntity->e.origin, &cubeProbeNearest, &cubeProbeSecondNearest );
Expand Down

0 comments on commit d07f176

Please sign in to comment.