diff --git a/utils/pxrad/lightmap.cpp b/utils/pxrad/lightmap.cpp index 29ca9c27..b3ca2535 100644 --- a/utils/pxrad/lightmap.cpp +++ b/utils/pxrad/lightmap.cpp @@ -2235,14 +2235,7 @@ void CreateDirectLights( void ) g_directlights = dl; if( !VectorIsNull( p->reflectivity )) - { - VectorScale( dl->intensity, 0.5 / M_PI, dl->intensity ); VectorMultiply( dl->intensity, p->reflectivity, dl->intensity ); - } - else - { - VectorScale( dl->intensity, DIRECT_SCALE, dl->intensity ); - } if( !FBitSet( p->flags, PATCH_EMITLIGHT ) || g_fastmode ) dl->topatch = true; diff --git a/utils/pxrad/qrad.cpp b/utils/pxrad/qrad.cpp index 33e25b8c..de63136e 100644 --- a/utils/pxrad/qrad.cpp +++ b/utils/pxrad/qrad.cpp @@ -448,13 +448,7 @@ void InitWorldLightFromPatch( dworldlight_t *wl, patch_t *p ) VectorScale( wl->intensity, p->exposure, wl->intensity ); if( !VectorIsNull( p->reflectivity )) - { VectorMultiply( wl->intensity, p->reflectivity, wl->intensity ); - } - else - { - VectorScale( wl->intensity, DIRECT_SCALE, wl->intensity ); - } VectorCopy( GetPlaneFromFace( p->faceNumber )->normal, wl->normal ); wl->stopdot = wl->stopdot2 = 0.0f; // not used @@ -985,6 +979,11 @@ void ReadLightFile( const char *filename, bool use_direct_path ) g = powf( g / 255.0f, 2.2f ); b = powf( b / 255.0f, 2.2f ); + //moved here from CreateDirectLights and InitWorldLightFromPatch + r *= 0.5f / M_PI; + g *= 0.5f / M_PI; + b *= 0.5f / M_PI; + if( argCnt == 2 ) { // eith 1+1 args, the R,G,B values are all equal to the first value