]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIWingman.cxx
NavDisplay: fix update lag when switching range or centre.
[flightgear.git] / src / AIModel / AIWingman.cxx
index b64446dbe4e65e27365e36fb50028b9b82658f47..9ba01042a413a8ed6ca7615ef32587b3598399a0 100644 (file)
@@ -203,7 +203,11 @@ void FGAIWingman::unbind() {
 bool FGAIWingman::init(bool search_in_AI_path) {
     if (!FGAIBallistic::init(search_in_AI_path))
         return false;
+    reinit();
+    return true;
+}
 
+void FGAIWingman::reinit() {
     invisible = false;
 
     _tgt_x_offset = _x_offset;
@@ -223,7 +227,8 @@ bool FGAIWingman::init(bool search_in_AI_path) {
 
     props->setStringValue("submodels/path", _path.c_str());
     user_WoW_node      = fgGetNode("gear/gear[1]/wow", true);
-    return true;
+
+    FGAIBallistic::reinit();
 }
 
 void FGAIWingman::update(double dt) {
@@ -414,7 +419,7 @@ void FGAIWingman::Join(double dt) {
             _formate_to_ac = true;
             _join = false;
 
-            SG_LOG(SG_GENERAL, SG_ALERT, _name << " joined " << " RANGE " << distance
+            SG_LOG(SG_AI, SG_ALERT, _name << " joined " << " RANGE " << distance
             << " SPEED " << speed );
 
             return;