更新 'src/Environment/environment_mgr.cxx'

This commit is contained in:
2022-11-28 13:27:51 +08:00
parent 7b25d09cdd
commit 1a481ce1da

View File

@@ -335,6 +335,8 @@ void FGEnvironmentMgr::updateClosestAirport()
SGGeod nearestTowerPosition;
std::string nearestIdent;
std::string my_mes;
const SGGeod airportGeod;
double towerDistance = numeric_limits<double>::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) {