Skip to content

Commit

Permalink
disable --with-server
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Feb 2, 2024
1 parent 9b92fc8 commit 656b424
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
21 changes: 12 additions & 9 deletions bin/src/commands/launch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -278,15 +278,18 @@ pub fn execute(matches: &ArgMatches) -> Result<Report, Error> {
.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());
Expand Down
8 changes: 4 additions & 4 deletions book/commands/launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Options:
<a href="#-e---executable">-e, --executable &lt;executable&gt;</a>
Arma 3 executable to launch

<a href="#-S---with-server">-S, --with-server</a>
Launches a dedicated server alongside the client
<!-- <a href="#-S---with-server">-S, --with-server</a>
Launches a dedicated server alongside the client -->

<a href="#-i---instances">-i, --instances &lt;instances&gt;</a>
Launches multiple instances of the game
Expand Down Expand Up @@ -129,13 +129,13 @@ The name of the Arma 3 executable to launch. This is usually `arma3` or `arma3_x

## Options

### -S, --with-server
<!-- ### -S, --with-server
Launches a dedicated server alongside the client.
```bash
hemtt launch -S
```
``` -->

### -i, --instances &lt;instances&gt;

Expand Down

0 comments on commit 656b424

Please sign in to comment.