forked from StrafesNET/map-tool
fix vtf path
This commit is contained in:
parent
43b756bf8e
commit
4907362c71
@ -1102,7 +1102,12 @@ fn get_vmt<F:Fn(String)->AResult<Option<Vec<u8>>>>(find_stuff:&F,search_name:Str
|
||||
fn recursive_vmt_loader<F:Fn(String)->AResult<Option<Vec<u8>>>>(find_stuff:&F,material:vmt_parser::material::Material)->AResult<Option<Vec<u8>>>{
|
||||
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())?{
|
||||
|
Loading…
Reference in New Issue
Block a user