16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 08:59:18 +02:00

support for seasonal texture sets, wireframe mode render speed fix

This commit is contained in:
tmj-fstate
2017-10-23 15:57:37 +02:00
parent 35e526a454
commit d92004a818
9 changed files with 108 additions and 60 deletions

View File

@@ -716,8 +716,11 @@ texture_manager::create( std::string Filename, bool const Loadnow ) {
Filename.erase( traitpos );
}
if( Filename.rfind( '.' ) != std::string::npos )
Filename.erase( Filename.rfind( '.' ) ); // trim extension if there's one
if( ( Filename.rfind( '.' ) != std::string::npos )
&& ( Filename.rfind( '.' ) != Filename.rfind( ".." ) + 1 ) ) {
// trim extension if there's one, but don't mistake folder traverse for extension
Filename.erase( Filename.rfind( '.' ) );
}
for( char &c : Filename ) {
// change forward slashes to windows ones. NOTE: probably not strictly necessary, but eh