From 70c21c8314f61eab318e1ded68cd5dcaff9d70ab Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 28 Mar 2010 03:46:46 +0000 Subject: [PATCH] - Changed FTextureManager::CheckForTexture() search algorithm so that inexact matches on textures of type TEX_MiscPatch will return the first such texture, as it does with all the other types. (It will still prefer to return a texture of a different type. Why are these treated differently, anyway?) SVN r2251 (trunk) --- src/textures/texturemanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index 33c6e38e3..34e2f4ae6 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -140,7 +140,9 @@ FTextureID FTextureManager::CheckForTexture (const char *name, int usetype, BITF else { if (firsttype == FTexture::TEX_Null || - (firsttype == FTexture::TEX_MiscPatch && tex->UseType != FTexture::TEX_Null) + (firsttype == FTexture::TEX_MiscPatch && + tex->UseType != firsttype && + tex->UseType != FTexture::TEX_Null) ) { firstfound = i;