From cf9a364f719319666f2260ce6f1cc3236c0ad2db Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 18 Nov 2017 18:22:44 +0200 Subject: [PATCH] textures for models --- src/gl/models/gl_models.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index fcad2a95b..a1098706d 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -343,14 +343,8 @@ FTextureID LoadSkin(const char * path, const char * fn) buffer.Format("%s%s", path, fn); int texlump = FindGFXFile(buffer); - if (texlump>=0) - { - return TexMan.CheckForTexture(Wads.GetLumpFullName(texlump), FTexture::TEX_Any, FTextureManager::TEXMAN_TryAny); - } - else - { - return FNullTextureID(); - } + const char * const texname = texlump < 0 ? fn : Wads.GetLumpFullName(texlump); + return TexMan.CheckForTexture(texname, FTexture::TEX_Any, FTextureManager::TEXMAN_TryAny); } //===========================================================================