From d0dcce342b581b17aaba3eb5c135766eb42f4517 Mon Sep 17 00:00:00 2001 From: Garux Date: Mon, 25 Jan 2021 07:29:46 +0300 Subject: [PATCH] use LightFlags::FastActual shortcut --- tools/quake3/q3map2/light_ydnar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/quake3/q3map2/light_ydnar.cpp b/tools/quake3/q3map2/light_ydnar.cpp index 20358a6e..c48e5fd5 100644 --- a/tools/quake3/q3map2/light_ydnar.cpp +++ b/tools/quake3/q3map2/light_ydnar.cpp @@ -3692,7 +3692,7 @@ void SetupEnvelopes( bool forGrid, bool fastFlag ){ light->flags |= LightFlags::FastTemp; } if ( light->si && light->si->noFast ) { - light->flags &= ~( LightFlags::Fast | LightFlags::FastTemp ); + light->flags &= ~( LightFlags::FastActual ); } /* clear light envelope */ @@ -3703,7 +3703,7 @@ void SetupEnvelopes( bool forGrid, bool fastFlag ){ light->envelope = MAX_WORLD_COORD * 8.0f; /* check for fast mode */ - if ( ( light->flags & LightFlags::Fast ) || ( light->flags & LightFlags::FastTemp ) ) { + if ( light->flags & LightFlags::FastActual ) { /* ugly hack to calculate extent for area lights, but only done once */ VectorScale( light->normal, -1.0f, dir ); for ( radius = 100.0f; radius < MAX_WORLD_COORD * 8.0f; radius += 10.0f ) @@ -3737,7 +3737,7 @@ void SetupEnvelopes( bool forGrid, bool fastFlag ){ light->envelope = MAX_WORLD_COORD * 8.0f; } - else if ( ( light->flags & LightFlags::Fast ) || ( light->flags & LightFlags::FastTemp) ) { + else if ( light->flags & LightFlags::FastActual ) { /* solve distance for linear lights */ if ( ( light->flags & LightFlags::AttenLinear ) ) { light->envelope = ( ( intensity * linearScale ) - light->falloffTolerance ) / light->fade;