]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIMultiplayer.cxx
Removed legacy interactive approach ATC
[flightgear.git] / src / AIModel / AIMultiplayer.cxx
index d2fb505c0dfa1a696d26a26e9ea2c7ec80e1bc97..476ddf205b54e1de4f3aa71ac315dab62ff240df 100644 (file)
@@ -63,14 +63,19 @@ bool FGAIMultiplayer::init(bool search_in_AI_path) {
         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() {
     FGAIBase::bind();
 
     props->tie("refuel/contact", SGRawValuePointer<bool>(&contact));
-    props->setBoolValue("tanker",isTanker);
+    props->tie("tanker", SGRawValuePointer<bool>(&isTanker));
 
     props->tie("controls/invisible",
         SGRawValuePointer<bool>(&invisible));
@@ -102,6 +107,8 @@ void FGAIMultiplayer::unbind() {
     props->untie("controls/lag-adjust-system-speed");
     props->untie("controls/invisible");
     props->untie("refuel/contact");
+    props->untie("tanker");
+
 }
 
 void FGAIMultiplayer::update(double dt)
@@ -460,16 +467,20 @@ void FGAIMultiplayer::update(double dt)
 
 
     if ( isTanker) {
+        //cout << "IS tanker ";
         if ( (range_ft2 < 250.0 * 250.0) &&
             (y_shift > 0.0)    &&
             (elevation > 0.0) ){
                 // refuel_node->setBoolValue(true);
+                 //cout << "in contact"  << endl;
             contact = true;
         } else {
             // refuel_node->setBoolValue(false);
+            //cout << "not in contact"  << endl;
             contact = false;
         }
     } else {
+        //cout << "NOT tanker " << endl;
         contact = false;
     }