Skip to content

Commit

Permalink
impl FileExists
Browse files Browse the repository at this point in the history
  • Loading branch information
trumank committed Jun 27, 2024
1 parent 05e214a commit b61eafa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hook/src/hooks/pak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,15 @@ unsafe extern "system" fn hook_file_exists(
.to_string()
.unwrap();
//tracing::info!("FileExists({name})");
//if name.starts_with("../../../FSD/Content/_AssemblyStorm/TestMod/") {
if name.starts_with("../../../FSD/Content/_AssemblyStorm/TestMod/") {
let info = net_pak()
.lock()
.as_mut()
.unwrap()
.get_file_info(&name)
.expect("failed to get file info {name}");
return info.file_exists;
}
std::mem::transmute::<_, FnFileExists>(VTABLE_ORIG.0[14].unwrap())(this, file_name)
}

Expand Down

0 comments on commit b61eafa

Please sign in to comment.