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

Merge commit 'd8170c932b448ba6888e702746b5ae22632062d8' into sim

This commit is contained in:
milek7
2022-01-05 01:02:56 +01:00
76 changed files with 9277 additions and 5749 deletions

View File

@@ -288,7 +288,7 @@ bool TAnimModel::Load(cParser *parser, bool ter)
{ // gdy brak modelu
if (ter) // jeśli teren
{
if( name.substr( name.rfind( '.' ) ) == ".t3d" ) {
if( ends_with( name, ".t3d" ) ) {
name[ name.length() - 3 ] = 'e';
}
#ifdef EU07_USE_OLD_TERRAINCODE
@@ -680,11 +680,11 @@ TAnimModel::export_as_text_( std::ostream &Output ) const {
// don't include 'textures/' in the path
texturefile.erase( 0, std::string{ szTexturePath }.size() );
}
if( texturefile.find( ' ' ) == std::string::npos ) {
Output << texturefile << ' ';
if( contains( texturefile, ' ' ) ) {
Output << "\"" << texturefile << "\"" << ' ';
}
else {
Output << "\"" << texturefile << "\"" << ' ';
Output << texturefile << ' ';
}
// light submodels activation configuration
if( iNumLights > 0 ) {