fix messages
This commit is contained in:
parent
30ba3a09e1
commit
e142aa2d50
1 changed files with 11 additions and 11 deletions
|
@ -268,7 +268,7 @@ void Hitch::setWinchPositionAuto(bool doit)
|
||||||
|
|
||||||
_state->posLocalToGlobal(lWinchPos,_winchPos);
|
_state->posLocalToGlobal(lWinchPos,_winchPos);
|
||||||
_towLength=_winchInitialTowLength;
|
_towLength=_winchInitialTowLength;
|
||||||
fgGetNode("/sim/messages/pilot", true)->setStringValue("coonected to winch!");
|
fgSetString("/sim/messages/pilot", "Connected to winch!");
|
||||||
_open=false;
|
_open=false;
|
||||||
|
|
||||||
_node->setBoolValue("broken",false);
|
_node->setBoolValue("broken",false);
|
||||||
|
@ -358,15 +358,15 @@ void Hitch::findBestAIObject(bool doit,bool running_as_autoconnect)
|
||||||
{
|
{
|
||||||
std::stringstream message;
|
std::stringstream message;
|
||||||
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
|
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
|
||||||
<<", I am on your hook, distance "<<Math::sqrt(bestdist)<<"m";
|
<<", I am on your hook, distance "<<Math::sqrt(bestdist)<<" meter.";
|
||||||
fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str());
|
fgSetString("/sim/messages/pilot", message.str().c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::stringstream message;
|
std::stringstream message;
|
||||||
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
|
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
|
||||||
<<": I am on your hook, distance "<<Math::sqrt(bestdist)<<"m";
|
<<": I am on your hook, distance "<<Math::sqrt(bestdist)<<" meter.";
|
||||||
fgGetNode("/sim/messages/ai-plane", true)->setStringValue(message.str().c_str());
|
fgSetString("/sim/messages/ai-plane", message.str().c_str());
|
||||||
}
|
}
|
||||||
if (running_as_autoconnect)
|
if (running_as_autoconnect)
|
||||||
_isSlave=true;
|
_isSlave=true;
|
||||||
|
@ -378,7 +378,7 @@ void Hitch::findBestAIObject(bool doit,bool running_as_autoconnect)
|
||||||
else
|
else
|
||||||
if (!running_as_autoconnect)
|
if (!running_as_autoconnect)
|
||||||
{
|
{
|
||||||
fgGetNode("/sim/messages/atc", true)->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)
|
if (_dist>_towLength*1.00001)
|
||||||
{
|
{
|
||||||
std::stringstream message;
|
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()<<"' !";
|
<<_node->getPath()<<"' !";
|
||||||
fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str());
|
fgSetString("/sim/messages/pilot", message.str().c_str());
|
||||||
_open=true;
|
_open=true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -590,8 +590,8 @@ void Hitch::integrate (float dt)
|
||||||
if (_node->getBoolValue("broken",false)&&_open)
|
if (_node->getBoolValue("broken",false)&&_open)
|
||||||
message<<"Oh no, the tow is broken";
|
message<<"Oh no, the tow is broken";
|
||||||
else
|
else
|
||||||
message<<(_open?"Opened hitch '":"Locked hitch '")<<_node->getPath()<<"' !";
|
message<<(_open?"Opened hitch '":"Locked hitch '")<<_node->getPath()<<"'!";
|
||||||
fgGetNode("/sim/messages/pilot", true)->setStringValue(message.str().c_str());
|
fgSetString("/sim/messages/pilot", message.str().c_str());
|
||||||
_oldOpen=_open;
|
_oldOpen=_open;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ void Hitch::integrate (float dt)
|
||||||
std::stringstream message;
|
std::stringstream message;
|
||||||
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
|
message<<_node->getStringValue("tow/connected-to-ai-or-mp-callsign")
|
||||||
<<": I have released the tow!";
|
<<": 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue