]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIBase.cxx
Improve timing statistics
[flightgear.git] / src / AIModel / AIBase.cxx
index 514c6abb0498ad77eb133497fd2838e8c521948b..33cb073cbd5a3b30c5480fe7d88f8dd5c9e4265c 100644 (file)
@@ -59,6 +59,7 @@ FGAIBase::FGAIBase(object_type ot) :
     props( NULL ),
     model_removed( fgGetNode("/ai/models/model-removed", true) ),
     manager( NULL ),
+    _installed(false),
     fp( NULL ),
     _impact_lat(0),
     _impact_lon(0),
@@ -198,7 +199,7 @@ bool FGAIBase::init(bool search_in_AI_path) {
     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.
@@ -217,6 +218,8 @@ bool FGAIBase::init(bool search_in_AI_path) {
     
     if(f.empty())
         f = fgGetString("/sim/multiplay/default-model", default_model);
+    else
+        _installed = true;
 
     model = load3DModel(f, props);
 
@@ -229,6 +232,8 @@ bool FGAIBase::init(bool search_in_AI_path) {
 
     } 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);
@@ -606,7 +611,7 @@ double FGAIBase::_getRdot() const {
 }
 
 double FGAIBase::_getVS_fps() const {
-    return vs*60.0;
+    return vs/60.0;
 }
 
 double FGAIBase::_get_speed_east_fps() const {
@@ -618,7 +623,7 @@ double FGAIBase::_get_speed_north_fps() const {
 }
 
 void FGAIBase::_setVS_fps( double _vs ) {
-    vs = _vs/60.0;
+    vs = _vs*60.0;
 }
 
 double FGAIBase::_getAltitude() const {