diff --git a/Source/Core/GZBuilder/Data/TextureData.cs b/Source/Core/GZBuilder/Data/TextureData.cs index ed14da53..035e48a2 100644 --- a/Source/Core/GZBuilder/Data/TextureData.cs +++ b/Source/Core/GZBuilder/Data/TextureData.cs @@ -1,6 +1,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data { public struct TextureData { - public const string INVALID_TEXTURE = "**INVALID_TEXTURE**"; + public const string INVALID_TEXTURE = "**invalid_texture**"; public static string[] SUPPORTED_TEXTURE_EXTENSIONS = { ".jpg", ".tga", ".png", ".dds", ".pcx" }; } } diff --git a/Source/Core/GZBuilder/GZDoom/ModeldefStructure.cs b/Source/Core/GZBuilder/GZDoom/ModeldefStructure.cs index e56f2dcb..c56fb321 100644 --- a/Source/Core/GZBuilder/GZDoom/ModeldefStructure.cs +++ b/Source/Core/GZBuilder/GZDoom/ModeldefStructure.cs @@ -67,10 +67,14 @@ namespace CodeImp.DoomBuilder.GZBuilder.GZDoom { break; } else { //check extension - int dotPos = token.LastIndexOf("."); - string fileExt = token.Substring(token.LastIndexOf("."), token.Length - dotPos); - if (fileExt != ".md3" && fileExt != ".md2") { - General.ErrorLogger.Add(ErrorType.Error, "Error in " + parser.Source + " at line " + parser.GetCurrentLineNumber() + ": model '" + token + "' not parsed. Only MD3 and MD2 models are supported."); + string fileExt = Path.GetExtension(token); + if (string.IsNullOrEmpty(fileExt)){ + General.ErrorLogger.Add(ErrorType.Error, "Error in " + parser.Source + " at line " + parser.GetCurrentLineNumber() + ": model '" + token + "' won't be loaded. Models without extension are not supported by GZDoom."); + gotErrors = true; + break; + } + if(fileExt != ".md3" && fileExt != ".md2") { + General.ErrorLogger.Add(ErrorType.Error, "Error in " + parser.Source + " at line " + parser.GetCurrentLineNumber() + ": model '" + token + "' won't be loaded. Only MD2 and MD3 models are supported."); gotErrors = true; break; } diff --git a/Source/Core/GZBuilder/md3/ModelReader.cs b/Source/Core/GZBuilder/md3/ModelReader.cs index 7a854843..8ec553dc 100644 --- a/Source/Core/GZBuilder/md3/ModelReader.cs +++ b/Source/Core/GZBuilder/md3/ModelReader.cs @@ -125,7 +125,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3 //report errors if(errors.Count > 0) { foreach(string e in errors) - General.ErrorLogger.Add(ErrorType.Error, "ModelLoader: error while loading '" + mde.ModelNames[i] + "':" + e); + General.ErrorLogger.Add(ErrorType.Error, "ModelLoader: error while loading '" + mde.ModelNames[i] + "': " + e); } } }