mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-04 15:27:48 +00:00
fix: remove IW4x CDN hack
This commit is contained in:
19
src/main.rs
19
src/main.rs
@@ -704,21 +704,8 @@ async fn main() {
|
||||
install_path = env::current_dir().unwrap();
|
||||
}
|
||||
|
||||
let mut is_iw4x = false;
|
||||
if args.len() > 1 && args[1] == "iw4x" {
|
||||
is_iw4x = true;
|
||||
} else {
|
||||
let iw4x_reference_files = ["iw4mp.exe", "iw4sp.exe", "iw4x.exe"];
|
||||
for ref_file in iw4x_reference_files.iter() {
|
||||
if install_path.join(ref_file).exists() {
|
||||
is_iw4x = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if arg_bool(&args, "--rate") {
|
||||
cdn::rate_cdns_and_display(is_iw4x).await;
|
||||
cdn::rate_cdns_and_display(false).await;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -750,9 +737,7 @@ async fn main() {
|
||||
if initial_cdn.is_some() {
|
||||
cfg.offline = !global::check_connectivity(initial_cdn).await;
|
||||
} else {
|
||||
cfg.offline = !global::check_connectivity_and_rate_cdns(is_iw4x)
|
||||
.await
|
||||
.await;
|
||||
cfg.offline = !global::check_connectivity_and_rate_cdns(false).await.await;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user