/*
	maps\mp\[mapname]_lighting.gsc
	script for mp level-scripting
*/
#include maps\mp\_mp_lights;
#include maps\mp\_utility;

main()
{
	SetDvar( "r_lightGridEnableTweaks", 1 );
	SetDvar( "r_lightGridIntensity"	  , 1.33 );	

	//r_gunSightColorEntityScale needs to be set to tune the iron sights color shader (mtl_iron_sights_color). 
	//A change was made to fix the brightness, but causes untuned instances to be too bright. This will need to be tuned for every level.
	setdvar( "r_gunSightColorEntityScale", "7" );
	setdvar( "r_gunSightColorNoneScale", "0.8" );
	
 //   	setdvar( "r_mpRimColor", "1.6 1.2 .8" );
 //   	setdvar( "r_mpRimStrength", "15" );
 //   	setdvar( "r_mpRimDiffuseTint", "1.2 1.3 1.2" );
    	
    	thread set_lighting_values(); // after maps\mp\_load::main();
    
}

set_lighting_values()
{
    if ( IsUsingHDR() )
    {        while (true)
        {
            level waittill("connected", player);               // we need to set the dvars for each player as he connects.
               //        player SetClientDvars(
               // "r_tonemap", "1"               
           //);
         /*   player SetClientDvars(
                "r_tonemap", "1",
                "r_tonemapadaptspeed", ".07",
                "r_tonemapkey", "0",
                "r_veil", "1",
                "r_veilstrength", ".087",
                "r_tonemapexposure", "-10" 
              );
            
            //For setting the max exposure so we can get contrast back into the map without blowing everything out
            setdvar ("r_tonemapmaxexposure", "-10");
            
            //Controling how much SSAO there is in the scene
            setdvar ("r_ssaoPower", "3.5");
            setdvar ("r_ssaoBlurRadius", "1.5");
           */ 
        }
    }
}