MD3 reader: fixed a crash when trying to load a skin when skin names were used as a relative path in a model with several surfaces (and boy this description is much longer than the fix itself :) ).

This commit is contained in:
MaxED 2015-06-21 21:35:28 +00:00
parent 463d8af473
commit d561371110

View file

@ -172,7 +172,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
//relative path?
if(path.IndexOf(Path.DirectorySeparatorChar) == -1)
path = Path.Combine(Path.GetDirectoryName(mde.ModelNames[m]), path);
path = Path.Combine(Path.GetDirectoryName(mde.ModelNames[useSkins ? i : m]), path);
Texture t = LoadTexture(containers, path, device);