#include <simgear/compiler.h>
#include <simgear/misc/sg_path.hxx>
#include <Aircraft/aircraft.hxx>
-
-#ifndef FG_OLD_WEATHER
-#include <WeatherCM/FGLocalWeatherDatabase.h>
-#else
-#include <Weather/weather.hxx>
-#endif
+#include <Main/fg_props.hxx>
#include "uiuc_aircraft.h"
#include "uiuc_aircraftdir.h"
double vis;
if (Fog != 0)
{
- #ifndef FG_OLD_WEATHER
- vis = WeatherDatabase->getWeatherVisibility();
- if (Fog > 0)
- vis /= 1.01;
- else
- vis *= 1.01;
- WeatherDatabase->setWeatherVisibility( vis );
- #else
- vis = current_weather->get_visibility();
+ vis = fgGetDouble("/environment/visibility-m");
if (Fog > 0)
vis /= 1.01;
else
vis *= 1.01;
- current_weather->set_visibility( vis );
- #endif
+ fgSetDouble("/environment/visibility-m", vis);
}