diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj
index adcecce6..8b2c3480 100644
--- a/Source/Core/Builder.csproj
+++ b/Source/Core/Builder.csproj
@@ -514,11 +514,9 @@
3.5
-
-
False
diff --git a/Source/Core/Data/DataManager.cs b/Source/Core/Data/DataManager.cs
index ec668251..16b04a52 100644
--- a/Source/Core/Data/DataManager.cs
+++ b/Source/Core/Data/DataManager.cs
@@ -947,6 +947,7 @@ namespace CodeImp.DoomBuilder.Data
public ImageData GetTextureImage(long longname)
{
// Does this texture exist?
+ if(textures.ContainsKey(longname) && textures[longname] is HighResImage) return textures[longname]; //TEXTURES textures should still override regular ones...
if(texturenamesshorttofull.ContainsKey(longname)) return textures[texturenamesshorttofull[longname]]; //mxd
if(textures.ContainsKey(longname)) return textures[longname];
@@ -961,6 +962,7 @@ namespace CodeImp.DoomBuilder.Data
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
long hash = MurmurHash2.Hash(name.Trim().ToUpperInvariant());
+ if(textures.ContainsKey(hash) && textures[hash] is HighResImage) return textures[hash].Name; //TEXTURES textures should still override regular ones...
if(texturenamesshorttofull.ContainsKey(hash)) return textures[texturenamesshorttofull[hash]].Name;
if(textures.ContainsKey(hash)) return textures[hash].Name;
return name;
@@ -969,6 +971,7 @@ namespace CodeImp.DoomBuilder.Data
//mxd
internal long GetFullLongTextureName(long hash)
{
+ if(textures.ContainsKey(hash) && textures[hash] is HighResImage) return hash; //TEXTURES textures should still override regular ones...
return (General.Map.Config.UseLongTextureNames && texturenamesshorttofull.ContainsKey(hash) ? texturenamesshorttofull[hash] : hash);
}
@@ -1062,6 +1065,7 @@ namespace CodeImp.DoomBuilder.Data
public ImageData GetFlatImage(long longname)
{
// Does this flat exist?
+ if(flats.ContainsKey(longname) && flats[longname] is HighResImage) return flats[longname]; //TEXTURES flats should still override regular ones...
if(flatnamesshorttofull.ContainsKey(longname)) return flats[flatnamesshorttofull[longname]]; //mxd
if(flats.ContainsKey(longname)) return flats[longname];
@@ -1070,11 +1074,11 @@ namespace CodeImp.DoomBuilder.Data
}
// This returns an image by long and doesn't check if it exists
- public ImageData GetFlatImageKnown(long longname)
+ /*public ImageData GetFlatImageKnown(long longname)
{
// Return flat
return flatnamesshorttofull.ContainsKey(longname) ? flats[flatnamesshorttofull[longname]] : flats[longname]; //mxd
- }
+ }*/
//mxd. Gets full flat name by short flat name
public string GetFullFlatName(string name)
@@ -1083,6 +1087,7 @@ namespace CodeImp.DoomBuilder.Data
name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
long hash = MurmurHash2.Hash(name.ToUpperInvariant());
+ if(flats.ContainsKey(hash) && flats[hash] is HighResImage) return flats[hash].Name; //TEXTURES flats should still override regular ones...
if(flatnamesshorttofull.ContainsKey(hash)) return flats[flatnamesshorttofull[hash]].Name;
if(flats.ContainsKey(hash)) return flats[hash].Name;
return name;
@@ -1091,6 +1096,7 @@ namespace CodeImp.DoomBuilder.Data
//mxd
internal long GetFullLongFlatName(long hash)
{
+ if(flats.ContainsKey(hash) && flats[hash] is HighResImage) return hash; //TEXTURES flats should still override regular ones...
return (General.Map.Config.UseLongTextureNames && flatnamesshorttofull.ContainsKey(hash) ? flatnamesshorttofull[hash] : hash);
}
@@ -1191,8 +1197,7 @@ namespace CodeImp.DoomBuilder.Data
if(!string.IsNullOrEmpty(pname))
{
long longname = Lump.MakeLongName(pname);
- if(sprites.ContainsKey(longname))
- return true;
+ if(sprites.ContainsKey(longname)) return true;
// Go for all opened containers
for(int i = containers.Count - 1; i >= 0; i--)
diff --git a/Source/Core/Rendering/SurfaceManager.cs b/Source/Core/Rendering/SurfaceManager.cs
index f1f89b3d..c759fd15 100644
--- a/Source/Core/Rendering/SurfaceManager.cs
+++ b/Source/Core/Rendering/SurfaceManager.cs
@@ -623,33 +623,30 @@ namespace CodeImp.DoomBuilder.Rendering
}
else
{
- if(General.Map.Data.GetFlatExists(longimagename))
- {
- img = General.Map.Data.GetFlatImageKnown(longimagename);
-
- // Is the texture loaded?
- if(img.IsImageLoaded && !img.LoadFailed)
- {
- if(img.Texture == null) img.CreateTexture();
- }
- else
- {
- img = General.Map.Data.WhiteTexture;
- }
- }
- else if(longimagename == MapSet.EmptyLongName) //mxd
+ if(longimagename == MapSet.EmptyLongName)
{
img = General.Map.Data.MissingTexture3D;
}
- else
+ else
{
- img = General.Map.Data.UnknownTexture3D;
+ img = General.Map.Data.GetFlatImage(longimagename);
+
+ if(!(img is UnknownImage))
+ {
+ if(img.IsImageLoaded && !img.LoadFailed)
+ {
+ if(img.Texture == null) img.CreateTexture();
+ }
+ else
+ {
+ img = General.Map.Data.WhiteTexture;
+ }
+ }
}
}
// Store by texture
- if(!surfaces.ContainsKey(img))
- surfaces.Add(img, new List());
+ if(!surfaces.ContainsKey(img)) surfaces.Add(img, new List());
surfaces[img].Add(entry);
}
diff --git a/Source/Plugins/BuilderEffects/BuilderEffects.csproj b/Source/Plugins/BuilderEffects/BuilderEffects.csproj
index c89044d5..f3cef932 100644
--- a/Source/Plugins/BuilderEffects/BuilderEffects.csproj
+++ b/Source/Plugins/BuilderEffects/BuilderEffects.csproj
@@ -38,11 +38,8 @@
3.5
-
-
-
False
..\..\..\Build\Trackbar.dll
diff --git a/Source/Plugins/BuilderModes/BuilderModes.csproj b/Source/Plugins/BuilderModes/BuilderModes.csproj
index 7db29057..83419f69 100644
--- a/Source/Plugins/BuilderModes/BuilderModes.csproj
+++ b/Source/Plugins/BuilderModes/BuilderModes.csproj
@@ -39,10 +39,8 @@
3.5
-
-
diff --git a/Source/Plugins/ColorPicker/ColorPicker.csproj b/Source/Plugins/ColorPicker/ColorPicker.csproj
index 06093ef4..53510bd4 100644
--- a/Source/Plugins/ColorPicker/ColorPicker.csproj
+++ b/Source/Plugins/ColorPicker/ColorPicker.csproj
@@ -40,7 +40,6 @@
3.5
-
False
diff --git a/Source/Plugins/NodesViewer/NodesViewer.csproj b/Source/Plugins/NodesViewer/NodesViewer.csproj
index 012e6220..8b4dca73 100644
--- a/Source/Plugins/NodesViewer/NodesViewer.csproj
+++ b/Source/Plugins/NodesViewer/NodesViewer.csproj
@@ -60,7 +60,6 @@
-
diff --git a/Source/Plugins/TagExplorer/TagExplorer.csproj b/Source/Plugins/TagExplorer/TagExplorer.csproj
index a124bebe..8f2d7244 100644
--- a/Source/Plugins/TagExplorer/TagExplorer.csproj
+++ b/Source/Plugins/TagExplorer/TagExplorer.csproj
@@ -37,10 +37,8 @@
3.5
-
-
diff --git a/Source/Plugins/TagRange/TagRange.csproj b/Source/Plugins/TagRange/TagRange.csproj
index 2dd081ac..be58a558 100644
--- a/Source/Plugins/TagRange/TagRange.csproj
+++ b/Source/Plugins/TagRange/TagRange.csproj
@@ -38,7 +38,6 @@
3.5
-