]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIEscort.cxx
#545: Fix ATC chatter sound settings being ignored
[flightgear.git] / src / AIModel / AIEscort.cxx
index 927e62655ccd8785cf5e4fe238b4ca7e47a7d69e..c88e9af334adf5afac1530819877a71a8c438e56 100644 (file)
@@ -35,7 +35,6 @@
 #include <Main/viewer.hxx>
 
 #include <Scenery/scenery.hxx>
-#include <Scenery/tilemgr.hxx>
 
 #include "AIEscort.hxx"
 
@@ -135,7 +134,11 @@ void FGAIEscort::unbind() {
 bool FGAIEscort::init(bool search_in_AI_path) {
     if (!FGAIShip::init(search_in_AI_path))
         return false;
+    reinit();
+    return true;
+}
 
+void FGAIEscort::reinit() {
     invisible = false;
     no_roll = false;
 
@@ -148,7 +151,7 @@ bool FGAIEscort::init(bool search_in_AI_path) {
         hdg = _parent_hdg;
     }
 
-    return true;
+    FGAIShip::reinit();
 }
 
 void FGAIEscort::update(double dt) {
@@ -315,7 +318,7 @@ void FGAIEscort::setStationSpeed(){
     // these are the AI rules for the manoeuvring of escorts
 
     if (_MPControl && _tgtrange > 4 * _stn_limit){
-        SG_LOG(SG_GENERAL, SG_ALERT, "AIEscort: " << _name
+        SG_LOG(SG_AI, SG_ALERT, "AIEscort: " << _name
             << " re-aligning to MP pos");
         pos = _tgtpos;
         speed = 0;