From cdf745745a5515cef123bf588110b43c5bb9aeb4 Mon Sep 17 00:00:00 2001
From: biwa <6475593+biwa@users.noreply.github.com>
Date: Thu, 4 Jun 2020 16:16:09 +0200
Subject: [PATCH] Texture sets now work with textures from a directory or
 PK3/PK7 (it matches against the short 8 character name)

---
 Source/Core/Config/MatchingTextureSet.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Source/Core/Config/MatchingTextureSet.cs b/Source/Core/Config/MatchingTextureSet.cs
index 41cebca31..902b5fcb4 100755
--- a/Source/Core/Config/MatchingTextureSet.cs
+++ b/Source/Core/Config/MatchingTextureSet.cs
@@ -140,7 +140,7 @@ namespace CodeImp.DoomBuilder.Config
 		internal bool AddTexture(ImageData image)
 		{
 			// Check against regex
-			if(regex.IsMatch(image.Name.ToUpperInvariant()))
+			if(regex.IsMatch(image.ShortName.ToUpperInvariant()))
 			{
 				// Matches! Add it.
 				textures.Add(image);
@@ -158,7 +158,7 @@ namespace CodeImp.DoomBuilder.Config
 		internal bool AddFlat(ImageData image)
 		{
 			// Check against regex
-			if(regex.IsMatch(image.Name.ToUpperInvariant()))
+			if(regex.IsMatch(image.ShortName.ToUpperInvariant()))
 			{
 				// Matches! Add it.
 				flats.Add(image);
@@ -174,7 +174,7 @@ namespace CodeImp.DoomBuilder.Config
 		// This only checks if the given image is a match
 		internal bool IsMatch(ImageData image)
 		{
-			return regex.IsMatch(image.Name.ToUpperInvariant());
+			return regex.IsMatch(image.ShortName.ToUpperInvariant());
 		}
 
 		// This only checks if the given texture name is a match (mxd)
-- 
GitLab