From 1a481ce1da60c7d2d798a4bb5590e2868e2d630e Mon Sep 17 00:00:00 2001 From: zhongjin Date: Mon, 28 Nov 2022 13:27:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/Environment/environme?= =?UTF-8?q?nt=5Fmgr.cxx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Environment/environment_mgr.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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) {