diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index b842d26..af77de9 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -335,6 +335,8 @@ void FGEnvironmentMgr::updateClosestAirport() SGGeod nearestTowerPosition; std::string nearestIdent; + std::string my_mes; + const SGGeod airportGeod; double towerDistance = numeric_limits::max(); if (nearestAirport) { @@ -423,6 +425,12 @@ void FGEnvironmentMgr::updateClosestAirport() if (fgGetString("/sim/airport/nearest-tower-ident") != nearestIdent) { SG_LOG(SG_ENVIRONMENT, SG_INFO, "Nearest airport tower now " << nearestIdent); fgSetString("/sim/airport/nearest-tower-ident", nearestIdent); + + //zhongjin + my_mes = "前方接近塔台 " + nearestIdent; + fgSetString("/sim/sound/voices/text", mes); + fgSetString("/sim/messages/copilot",mes); + } if (automaticTowerActive) { if (fgGetString("/sim/tower/airport-id") != nearestIdent) {