Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ lazy_static = "1.5.0"
dirs = "5.0.1"
once_cell = "1.19.0"
tauri-utils = { version = "1" }
ureq = { version = "2", default-features = false }
flate2 = "1"
crc32fast = "1"

[target.'cfg(windows)'.dependencies]
interprocess = { version = "1.2.1", default-features = false }
Expand Down
6 changes: 6 additions & 0 deletions src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::io::Read;

#[tauri::command]
pub async fn inject(
app: tauri::AppHandle,
name: &str,
ip: &str,
port: i32,
Expand All @@ -22,6 +23,11 @@ pub async fn inject(
omp_file
};

// Fetch the server's models as one compressed pack first; failures fall back to in-game downloads.
if !actual_omp_file.is_empty() {
crate::model_pack::prefetch(app, ip.to_string(), port).await;
}

crate::ipc::ensure_listening();

match injector::run_samp(
Expand Down
1 change: 1 addition & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod constants;
mod errors;
mod helpers;
mod injector;
mod model_pack;
mod ipc;
mod query;
mod samp;
Expand Down
Loading