void
FGAIBase::removeModel()
{
+ if (!_model.valid())
+ return;
+
FGScenery* pSceneryManager = globals->get_scenery();
if (pSceneryManager)
{
{
if (_model.valid())
{
- SG_LOG(SG_AI, SG_WARN, "AIBase: Cannot initialize a model multiple times! " << model_path);
+ SG_LOG(SG_AI, SG_ALERT, "AIBase: Cannot initialize a model multiple times! " << model_path);
return false;
}
{
const char* fxpath = prop->getStringValue("sound/path");
if (fxpath) {
- string sound_path = string(fxpath);
- if (sound_path != "") {
- _path = "/AI/"+sound_path;
- }
+ _path = string(fxpath);
}
_nasal->modelLoaded(path, prop, n);
}