@@ -5027,11 +5027,15 @@ void RE_LoadWorldMap( const char *name )
50275027 // try will not look at the partially loaded version
50285028 tr.world = nullptr ;
50295029
5030- // tr.worldDeluxeMapping will be set by R_LoadLightmaps()
5031- tr.worldLightMapping = false ;
5032- // tr.worldDeluxeMapping will be set by R_LoadEntities()
5033- tr.worldDeluxeMapping = false ;
5034- tr.worldHDR_RGBE = false ;
5030+ // It's probably a mistake if any of these lighting parameters are actually
5031+ // used before a map is loaded.
5032+ tr.worldLightMapping = false ; // set by R_LoadLightmaps
5033+ tr.worldDeluxeMapping = false ; // set by R_LoadEntities
5034+ tr.worldHDR_RGBE = false ; // set by R_LoadEntities
5035+ tr.mapOverBrightBits = r_overbrightDefaultExponent.Get (); // maybe set by R_LoadEntities
5036+ tr.overbrightBits = std::min ( tr.mapOverBrightBits , r_overbrightBits.Get () ); // set by RE_LoadWorldMap
5037+ tr.mapLightFactor = 1 .0f ; // set by RE_LoadWorldMap
5038+ tr.identityLight = 1 .0f ; // set by RE_LoadWorldMap
50355039
50365040 s_worldData = {};
50375041 Q_strncpyz ( s_worldData.name , name, sizeof ( s_worldData.name ) );
@@ -5119,7 +5123,6 @@ void RE_LoadWorldMap( const char *name )
51195123 tr.worldLight = tr.lightMode ;
51205124 tr.modelLight = lightMode_t::FULLBRIGHT;
51215125 tr.modelDeluxe = deluxeMode_t::NONE;
5122- tr.mapLightFactor = tr.identityLight = 1 .0f ;
51235126
51245127 // Use fullbright lighting for everything if the world is fullbright.
51255128 if ( tr.worldLight != lightMode_t::FULLBRIGHT )
0 commit comments