model_removed( fgGetNode("/ai/models/model-removed", true) ),
manager( NULL ),
fp( NULL ),
+ _installed(false),
_impact_lat(0),
_impact_lon(0),
_impact_elev(0),
string f;
if(search_in_AI_path)
{
- // setup a modified Options strucutre, with only the $fg-root/AI defined;
+ // setup a modified Options structure, with only the $fg-root/AI defined;
// we'll check that first, then give the normal search logic a chance.
// this ensures that models in AI/ are preferred to normal models, where
// both exist.
if(f.empty())
f = fgGetString("/sim/multiplay/default-model", default_model);
+ else
+ _installed = true;
model = load3DModel(f, props);
} else if (!model_path.empty()) {
SG_LOG(SG_INPUT, SG_WARN, "AIBase: Could not load model " << model_path);
+ // not properly installed...
+ _installed = false;
}
setDie(false);
isTanker = true;
// cout << "isTanker " << isTanker << " " << mCallSign <<endl;
}
- return FGAIBase::init(search_in_AI_path);
+
+ // load model
+ bool result = FGAIBase::init(search_in_AI_path);
+ // propagate installation state (used by MP pilot list)
+ props->setBoolValue("model-installed", _installed);
+ return result;
}
void FGAIMultiplayer::bind() {