Make sure to load the exact texture that is requested, not a scaled one

Don't load Overlay.3.png if Overlay.png is asked for
stable-5.2
Armin Burgmeier 2010-01-02 23:11:13 +01:00
parent 3ac6dd25cd
commit 7b022d88ea
1 changed files with 2 additions and 1 deletions

View File

@ -52,10 +52,11 @@ public:
virtual C4Surface* LoadTexture(const char* filename)
{
if(!Group.AccessEntry(filename)) return NULL;
C4Surface* surface = new C4Surface;
// Suppress error message here, StdMeshMaterial loader
// will show one.
if(!surface->LoadAny(Group, filename, false, true))
if(!surface->Read(Group, GetExtension(filename), false))
{ delete surface; surface = NULL; }
return surface;
}