]> git.mxchange.org Git - flightgear.git/commitdiff
hla: add io chanel configuration shortcut hla-local.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Wed, 21 Nov 2012 18:41:51 +0000 (19:41 +0100)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Sat, 24 Nov 2012 08:58:53 +0000 (09:58 +0100)
src/Main/fg_io.cxx
src/Main/options.cxx

index 3b2d0b93b82e3b0ff8dcf16a14e53d8acc522a23..cd66cf0c6447a7b689067f5446cc57a286c4f13e 100644 (file)
@@ -228,6 +228,19 @@ FGIO::parse_port_config( const string& config )
         else if ( protocol == "hla" ) {
             return new FGHLA(tokens);
         }
+        else if ( protocol == "hla-local" ) {
+            // This is just about to bring up some defaults
+            if (tokens.size() != 2) {
+                SG_LOG( SG_IO, SG_ALERT, "Ignoring invalid --hla-local option "
+                        "(one argument expected: --hla-local=<federationname>" );
+                return NULL;
+            }
+            tokens.insert(tokens.begin(), "");
+            tokens.insert(tokens.begin(), "60");
+            tokens.insert(tokens.begin(), "bi");
+            tokens.push_back("fg-local.xml");
+            return new FGHLA(tokens);
+        }
 #endif
         else {
             return NULL;
index ae38bdc751412541eadb05694c189f4f30c70ac1..7187431449b6eba72436cdd9839d8d66c52e005f 100644 (file)
@@ -1476,6 +1476,7 @@ struct OptionDesc {
     {"multiplay",                    true,  OPTION_CHANNEL | OPTION_MULTI, "", false, "", 0 },
 #ifdef FG_HAVE_HLA
     {"hla",                          true,  OPTION_CHANNEL, "", false, "", 0 },
+    {"hla-local",                    true,  OPTION_CHANNEL, "", false, "", 0 },
 #endif
     {"trace-read",                   true,  OPTION_FUNC | OPTION_MULTI,   "", false, "", fgOptTraceRead },
     {"trace-write",                  true,  OPTION_FUNC | OPTION_MULTI,   "", false, "", fgOptTraceWrite },