#include "environment_ctrl.hxx"
#include "environment_mgr.hxx"
#include "fgclouds.hxx"
+#include "precipitation_mgr.hxx"
class SGSky;
extern SGSky *thesky;
_controller->setEnvironment(_environment);
set_subsystem("controller", _controller, 0.5);
fgClouds = new FGClouds( _controller );
+ _precipitationManager = new FGPrecipitationMgr;
+ set_subsystem("precipitation", _precipitationManager);
}
FGEnvironmentMgr::~FGEnvironmentMgr ()
{
delete _environment;
remove_subsystem("controller");
+ remove_subsystem("precipitation");
delete _controller;
delete fgClouds;
+ delete _precipitationManager;
}
void
fgTie("/environment/visibility-m", _environment,
&FGEnvironment::get_visibility_m, &FGEnvironment::set_visibility_m);
fgSetArchivable("/environment/visibility-m");
+ fgTie("/environment/effective-visibility-m", thesky,
+ &SGSky::get_visibility );
fgTie("/environment/temperature-sea-level-degc", _environment,
&FGEnvironment::get_temperature_sea_level_degc,
&FGEnvironment::set_temperature_sea_level_degc);
FGEnvironmentMgr::unbind ()
{
fgUntie("/environment/visibility-m");
+ fgUntie("/environment/effective-visibility-m");
fgUntie("/environment/temperature-sea-level-degc");
fgUntie("/environment/temperature-degc");
fgUntie("/environment/dewpoint-sea-level-degc");