From e142aa2d508e3bf122c0e59dacacaa51adca7e25 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 20 Jan 2007 22:22:47 +0000 Subject: [PATCH] fix messages --- src/FDM/YASim/Hitch.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/FDM/YASim/Hitch.cpp b/src/FDM/YASim/Hitch.cpp index 87e75ee70..0b21d1889 100755 --- a/src/FDM/YASim/Hitch.cpp +++ b/src/FDM/YASim/Hitch.cpp @@ -268,7 +268,7 @@ void Hitch::setWinchPositionAuto(bool doit) _state->posLocalToGlobal(lWinchPos,_winchPos); _towLength=_winchInitialTowLength; - fgGetNode("/sim/messages/pilot", true)->setStringValue("coonected to winch!"); + fgSetString("/sim/messages/pilot", "Connected to winch!"); _open=false; _node->setBoolValue("broken",false); @@ -358,15 +358,15 @@ void Hitch::findBestAIObject(bool doit,bool running_as_autoconnect) { std::stringstream message; message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign") - <<", I am on your hook, distance "<setStringValue(message.str().c_str()); + <<", I am on your hook, distance "<getStringValue("tow/connected-to-ai-or-mp-callsign") - <<": I am on your hook, distance "<setStringValue(message.str().c_str()); + <<": I am on your hook, distance "<setStringValue("Sorry, no aircraft for aerotow!"); + fgSetString("/sim/messages/atc", "Sorry, no aircraft for aerotow!"); } } @@ -578,9 +578,9 @@ void Hitch::integrate (float dt) if (_dist>_towLength*1.00001) { std::stringstream message; - message<<"Could not lock Hitch (tow length is insufficient) on hitch '" + message<<"Could not lock hitch (tow length is insufficient) on hitch '" <<_node->getPath()<<"' !"; - fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str()); + fgSetString("/sim/messages/pilot", message.str().c_str()); _open=true; return; } @@ -590,8 +590,8 @@ void Hitch::integrate (float dt) if (_node->getBoolValue("broken",false)&&_open) message<<"Oh no, the tow is broken"; else - message<<(_open?"Opened hitch '":"Locked hitch '")<<_node->getPath()<<"' !"; - fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str()); + message<<(_open?"Opened hitch '":"Locked hitch '")<<_node->getPath()<<"'!"; + fgSetString("/sim/messages/pilot", message.str().c_str()); _oldOpen=_open; } @@ -696,7 +696,7 @@ void Hitch::integrate (float dt) std::stringstream message; message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign") <<": I have released the tow!"; - fgGetNode("/sim/messages/ai-plane", true)->setStringValue(message.str().c_str()); + fgSetString("/sim/messages/ai-plane", message.str().c_str()); } } } -- 2.39.5