@@ -5060,11 +5060,15 @@ void RE_LoadWorldMap( const char *name )
50605060 // try will not look at the partially loaded version
50615061 tr.world = nullptr ;
50625062
5063- // tr.worldDeluxeMapping will be set by R_LoadLightmaps()
5064- tr.worldLightMapping = false ;
5065- // tr.worldDeluxeMapping will be set by R_LoadEntities()
5066- tr.worldDeluxeMapping = false ;
5067- tr.worldHDR_RGBE = false ;
5063+ // It's probably a mistake if any of these lighting parameters are actually
5064+ // used before a map is loaded.
5065+ tr.worldLightMapping = false ; // set by R_LoadLightmaps
5066+ tr.worldDeluxeMapping = false ; // set by R_LoadEntities
5067+ tr.worldHDR_RGBE = false ; // set by R_LoadEntities
5068+ tr.mapOverBrightBits = r_overbrightDefaultExponent.Get (); // maybe set by R_LoadEntities
5069+ tr.overbrightBits = std::min ( tr.mapOverBrightBits , r_overbrightBits.Get () ); // set by RE_LoadWorldMap
5070+ tr.mapLightFactor = 1 .0f ; // set by RE_LoadWorldMap
5071+ tr.identityLight = 1 .0f ; // set by RE_LoadWorldMap
50685072
50695073 s_worldData = {};
50705074 Q_strncpyz ( s_worldData.name , name, sizeof ( s_worldData.name ) );
@@ -5152,7 +5156,6 @@ void RE_LoadWorldMap( const char *name )
51525156 tr.worldLight = tr.lightMode ;
51535157 tr.modelLight = lightMode_t::FULLBRIGHT;
51545158 tr.modelDeluxe = deluxeMode_t::NONE;
5155- tr.mapLightFactor = tr.identityLight = 1 .0f ;
51565159
51575160 // Use fullbright lighting for everything if the world is fullbright.
51585161 if ( tr.worldLight != lightMode_t::FULLBRIGHT )
0 commit comments