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())?{