1
0
Fork 0

Merge branch 'master' of git://gitorious.org/fg/fgdata

This commit is contained in:
BARANGER Emmanuel 2010-11-22 01:48:16 +01:00
commit 84fdb9553f
3 changed files with 16 additions and 6 deletions

View file

@ -25,7 +25,7 @@
<property>/sim/rendering/landmass-shader</property> <property>/sim/rendering/landmass-shader</property>
<property>/sim/rendering/shader-effects</property> <property>/sim/rendering/shader-effects</property>
<less-equal> <less-equal>
<value type="float">4.0</value> <value type="float">4.5</value>
<float-property>/sim/rendering/quality-level</float-property> <float-property>/sim/rendering/quality-level</float-property>
</less-equal> </less-equal>
<or> <or>

View file

@ -92,9 +92,8 @@ void main (void)
//float pam = (map.a * -2) + 1; //reverse map //float pam = (map.a * -2) + 1; //reverse map
reflFactor = map.a + transparency_offset; reflFactor = map.a + transparency_offset;
} else { } else {
// set the reflectivity proportional to shininess with user // set the reflectivity proportional to shininess with user input
// input reflFactor = (gl_FrontMaterial.shininess / 128) * ns.a + transparency_offset;
reflFactor = (gl_FrontMaterial.shininess / 128) + transparency_offset;
} }
reflFactor = clamp(reflFactor, 0.0, 1.0); reflFactor = clamp(reflFactor, 0.0, 1.0);

View file

@ -1517,6 +1517,16 @@
<value type="int">1</value> <value type="int">1</value>
</greater-than>> </greater-than>>
</enable> </enable>
<binding>
<command>dialog-apply</command>
<object-name>metar</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
setprop( "/environment/metar/data", getprop( "sim/gui/dialogs/weather-scenario/metar") );
</script>
</binding>
</textbox> </textbox>
<!-- Automatic Weather --> <!-- Automatic Weather -->
@ -1574,7 +1584,7 @@
} }
me.scenarioListenerId = setlistener( me.base ~ "/source-selection", func(n) { me.scenarioListener(n); } ); me.scenarioListenerId = setlistener( me.base ~ "/source-selection", func(n) { me.scenarioListener(n); } );
me.metarListenerId = setlistener( "environment/metar/valid", func(n) { me.metarListener(n); }, 1, 0 ); me.metarListenerId = setlistener( "environment/metar/valid", func(n) { me.metarListener(n); }, 1, 1 );
}, },
close : func { close : func {
@ -1584,7 +1594,7 @@
stateChange : func { stateChange : func {
var scenarioName = getprop( me.base ~ "/source-selection"); var scenarioName = getprop( me.base ~ "/source-selection");
var metar = nil; var metar = getprop( "environment/metar/data" );
if( scenarioName == "Disabled" ) { if( scenarioName == "Disabled" ) {
setprop( "/environment/params/metar-updates-environment", 0 ); setprop( "/environment/params/metar-updates-environment", 0 );
setprop( "/environment/realwx/enabled", 0 ); setprop( "/environment/realwx/enabled", 0 );
@ -1652,6 +1662,7 @@
var metar = getprop("environment/metar/data"); var metar = getprop("environment/metar/data");
if( metar == nil or metar == "" ) metar = "NIL"; if( metar == nil or metar == "" ) metar = "NIL";
metar = normalize_string(metar); metar = normalize_string(metar);
printlog( "info", "new METAR: " ~ metar );
setprop( me.base ~ "/metar", metar ); setprop( me.base ~ "/metar", metar );
gui.dialog_update( "weather", "metar" ); gui.dialog_update( "weather", "metar" );
}, },