]> git.mxchange.org Git - flightgear.git/commitdiff
Stuart Buchanan:
authorTorsten Dreyer <Torsten@t3r.de>
Thu, 20 May 2010 19:25:37 +0000 (21:25 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Thu, 20 May 2010 19:25:37 +0000 (21:25 +0200)
A small patch to allow the user to ignore specific
MP aircraft on a per-MP instance basis by setting
"controls/invisible". This
property name was chosen for consistency with the existing property
for AIBallistic objects.

src/AIModel/AIMultiplayer.cxx

index ab9cc5c3cf8915a8c1320908fb7eafe034adf908..d2fb505c0dfa1a696d26a26e9ea2c7ec80e1bc97 100644 (file)
@@ -72,6 +72,9 @@ void FGAIMultiplayer::bind() {
     props->tie("refuel/contact", SGRawValuePointer<bool>(&contact));
     props->setBoolValue("tanker",isTanker);
 
+    props->tie("controls/invisible",
+        SGRawValuePointer<bool>(&invisible));
+
 #define AIMPROProp(type, name) \
 SGRawValueMethods<FGAIMultiplayer, type>(*this, &FGAIMultiplayer::get##name)
 
@@ -97,6 +100,7 @@ void FGAIMultiplayer::unbind() {
     //props->untie("callsign");
     props->untie("controls/allow-extrapolation");
     props->untie("controls/lag-adjust-system-speed");
+    props->untie("controls/invisible");
     props->untie("refuel/contact");
 }