From: Thomas Debesse Date: Thu, 18 Feb 2021 19:08:11 +0000 (+0100) Subject: netradiant: also look for .dds file in dds/ prefix like Doom3 or DarkPlaces X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6998d7a4b8491415a8d01569c58a0e04e5f86dfa;p=xonotic%2Fnetradiant.git netradiant: also look for .dds file in dds/ prefix like Doom3 or DarkPlaces also tell user which image file is found for the given texture path --- diff --git a/radiant/image.cpp b/radiant/image.cpp index c9014294..5f16c01a 100644 --- a/radiant/image.cpp +++ b/radiant/image.cpp @@ -50,7 +50,19 @@ public: StringOutputStream fullname( 256 ); fullname << m_name << '.' << name; ArchiveFile* file = GlobalFileSystem().openFile( fullname.c_str() ); + + // also look for .dds image in dds/ prefix like Doom3 or DarkPlaces + if ( file == 0 && !string_compare( name, "dds" ) ) + { + fullname.clear(); + fullname << name << '/' << m_name << '.' << name; + file = GlobalFileSystem().openFile( fullname.c_str() ); + } + if ( file != 0 ) { + // tell user which image file is found for the given texture path + globalOutputStream() << "Found image file: \"" << fullname.c_str() << "\"\n"; + m_image = table.loadImage( *file ); file->release(); }