From 656b424697f71e2a182860d5b8c7ccff3cc9386b Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Fri, 2 Feb 2024 16:30:44 -0600 Subject: [PATCH] disable --with-server --- bin/src/commands/launch/mod.rs | 21 ++++++++++++--------- book/commands/launch.md | 8 ++++---- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/bin/src/commands/launch/mod.rs b/bin/src/commands/launch/mod.rs index dfad4409..af74adbb 100644 --- a/bin/src/commands/launch/mod.rs +++ b/bin/src/commands/launch/mod.rs @@ -49,13 +49,13 @@ pub fn cli() -> Command { .raw(true) .help("Passthrough additional arguments to Arma 3"), ) - .arg( - clap::Arg::new("server") - .long("with-server") - .short('S') - .help("Launches a dedicated server alongside the client") - .action(ArgAction::SetTrue), - ) + // .arg( + // clap::Arg::new("server") + // .long("with-server") + // .short('S') + // .help("Launches a dedicated server alongside the client") + // .action(ArgAction::SetTrue), + // ) .arg( clap::Arg::new("instances") .long("instances") @@ -278,15 +278,18 @@ pub fn execute(matches: &ArgMatches) -> Result { .join(" "), ); + // let with_server = matches.get_flag("server"); + let with_server = false; + let mut instances = vec![]; - if matches.get_flag("server") { + if with_server { let mut args = args.clone(); args.push("-server".to_string()); instances.push(args); } for _ in 0..instance_count { let mut args = args.clone(); - if matches.get_flag("server") { + if with_server { args.push("-connect=127.0.0.1".to_string()); } else { args.push("-filePatching".to_string()); diff --git a/book/commands/launch.md b/book/commands/launch.md index a2f387cf..e8cecfea 100644 --- a/book/commands/launch.md +++ b/book/commands/launch.md @@ -15,8 +15,8 @@ Options: -e, --executable <executable> Arma 3 executable to launch - -S, --with-server - Launches a dedicated server alongside the client + -i, --instances <instances> Launches multiple instances of the game @@ -129,13 +129,13 @@ The name of the Arma 3 executable to launch. This is usually `arma3` or `arma3_x ## Options -### -S, --with-server + ### -i, --instances <instances>