#include "Airports/runways.hxx"
#include "Airports/simple.hxx"
-#include "Include/version.h"
+#ifndef _MSC_VER
+# include "Include/version.h"
+#endif
#include "Main/fg_props.hxx"
#include "Main/globals.hxx"
#include "instrument_mgr.hxx"
void
MK_VIII::PropertiesHandler::unbind ()
{
- vector<SGPropertyNode *>::iterator iter;
+ vector<SGPropertyNode_ptr>::iterator iter;
for (iter = tied_properties.begin(); iter != tied_properties.end(); iter++)
(*iter)->untie();
// [PILOT] page 20 specifies that the terrain clearance is equal to
// 75% of the radio altitude, averaged over the previous 15 seconds.
- deque< Sample<double> >::iterator iter;
+ samples_type::iterator iter;
// remove samples older than 15 seconds
for (iter = samples.begin(); iter != samples.end() && globals->get_sim_time_sec() - (*iter).timestamp >= 15; iter = samples.begin())
// Erase everything from the beginning of the list up to the sample
// preceding the most recent sample whose age is >= 1 second.
- deque< Sample< Parameter<double> > >::iterator erase_last = altitude_samples.begin();
- deque< Sample< Parameter<double> > >::iterator iter;
+ altitude_samples_type::iterator erase_last = altitude_samples.begin();
+ altitude_samples_type::iterator iter;
for (iter = altitude_samples.begin(); iter != altitude_samples.end(); iter++)
if (globals->get_sim_time_sec() - (*iter).timestamp >= 1)
std::ostringstream refname;
refname << mk->name << "[" << mk->num << "]" << "/" << name;
- SGSoundSample *sample = globals->get_soundmgr()->find(refname.str());
+ SGSoundMgr *soundmgr = globals->get_soundmgr();
+ if (soundmgr->is_working() == false)
+ {
+ return NULL;
+ }
+
+ SGSoundSample *sample = soundmgr->find(refname.str());
if (! sample)
{
SGPath sample_path(globals->get_fg_root());
exit(1);
}
- globals->get_soundmgr()->add(sample, refname.str());
+ soundmgr->add(sample, refname.str());
samples[refname.str()] = sample;
}