From 4907362c718c97db06abdc0d743d8beefa71f1c0 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 10 Jan 2024 17:58:13 -0800 Subject: [PATCH] fix vtf path --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index cd26be8..ef30bbb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1102,7 +1102,12 @@ fn get_vmtAResult>>>(find_stuff:&F,search_name:Str fn recursive_vmt_loaderAResult>>>(find_stuff:&F,material:vmt_parser::material::Material)->AResult>>{ match get_some_texture(material)?{ VMTContent::VMT(s)=>recursive_vmt_loader(find_stuff,get_vmt(find_stuff,s)?), - VMTContent::VTF(s)=>find_stuff(s), + VMTContent::VTF(s)=>{ + let mut texture_file_name=std::path::PathBuf::from("materials"); + texture_file_name.push(s); + texture_file_name.set_extension("vtf"); + find_stuff(texture_file_name.into_os_string().into_string().unwrap()) + }, VMTContent::Patch(mat)=>recursive_vmt_loader(find_stuff, mat.resolve(|search_name|{ match find_stuff(search_name.to_string())?{