Hi,
currently we can only refuel by mp behing a "MOBIL" plane, with a plane
having the "multiplay/tanker" set.
here's a proposal that permit to use any callsign (yes i know in this
case the tanker will not have a tacan working), and any plane, for
exemple the tanker pilot can cut the probe/drogue alimentation, or with
adding a refueling pod any plane can become a tanker ....
if a c++ guru can have a look and commit (any comment welcome, my c++
skills are just at a beguinner state).
the victor is waiting for this (or something similar), with a refuelling
available by mp only when the drogue is out .
jano
diff --git a/src/AIModel/AIMultiplayer.cxx b/src/AIModel/AIMultiplayer.cxx
index d2fb505..be90190 100644
--- a/src/AIModel/AIMultiplayer.cxx
+++ b/src/AIModel/AIMultiplayer.cxx
@@ -51,18 +51,8 @@ FGAIMultiplayer::~FGAIMultiplayer() {
bool FGAIMultiplayer::init(bool search_in_AI_path) {
props->setStringValue("sim/model/path", model_path.c_str());
//refuel_node = fgGetNode("systems/refuel/contact", true);
- isTanker = false; // do this until this property is
- // passed over the net
+ isTanker = false; // set the tanker property to false by default for all mp aircrafts
- string str1 = _getCallsign();
- string str2 = "MOBIL";
-
- string::size_type loc1= str1.find( str2, 0 );
- if ( (loc1 != string::npos && str2 != "") ){
- // cout << " string found " << str2 << " in " << str1 << endl;
- isTanker = true;
- // cout << "isTanker " << isTanker << " " << mCallSign <<endl;
- }
return FGAIBase::init(search_in_AI_path);
}
@@ -70,7 +60,8 @@ void FGAIMultiplayer::bind() {
FGAIBase::bind();
props->tie("refuel/contact", SGRawValuePointer<bool>(&contact));
- props->setBoolValue("tanker",isTanker);
+ //props->setBoolValue("tanker",isTanker);
+ props->tie("tanker", SGRawValuePointer<bool>(&isTanker));
props->tie("controls/invisible",
SGRawValuePointer<bool>(&invisible));
@@ -102,6 +93,7 @@ void FGAIMultiplayer::unbind() {
props->untie("controls/lag-adjust-system-speed");
props->untie("controls/invisible");
props->untie("refuel/contact");
+ props->untie("tanker");
}
void FGAIMultiplayer::update(double dt)
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel