On Thu, Oct 30, 2008 at 5:54 PM, Martin Spott <[EMAIL PROTECTED]> wrote:
>
> We're going to present FG on a show this wekend.
> Just in case, should we feel annoyed for whatever reason, is there any
> switch to disable precipitation reliably ?
Try attached simple patch.
--
Csaba/Jester
Index: precipitation.cxx
===================================================================
RCS file: /var/cvs/SimGear-0.3/source/simgear/environment/precipitation.cxx,v
retrieving revision 1.2
diff -u -r1.2 precipitation.cxx
--- precipitation.cxx 4 Mar 2008 08:58:33 -0000 1.2
+++ precipitation.cxx 30 Oct 2008 17:15:37 -0000
@@ -25,6 +25,7 @@
*/
#include "precipitation.hxx"
+#include "visual_enviro.hxx"
#include <simgear/constants.h>
@@ -146,7 +147,8 @@
this->_snow_intensity = this->_rain_intensity;
}
- if (this->_snow_intensity > 0) {
+ bool enabled = sgEnviro.get_precipitation_enable_state();
+ if (enabled && this->_snow_intensity > 0) {
_precipitationEffect->setWind(_wind_vec);
_precipitationEffect->setParticleSpeed( -0.75f - 0.25f*_snow_intensity);
@@ -158,7 +160,7 @@
_precipitationEffect->setFarTransition(100.0f - 60.0f*sqrtf(_snow_intensity));
_precipitationEffect->setParticleColor(osg::Vec4(0.85, 0.85, 0.85, 1.0) - osg::Vec4(0.1, 0.1, 0.1, 1.0) * _snow_intensity);
- } else if (this->_rain_intensity > 0){
+ } else if (enabled && this->_rain_intensity > 0) {
_precipitationEffect->setWind(_wind_vec);
_precipitationEffect->setParticleSpeed( -2.0f + -5.0f*_rain_intensity);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel