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

partial shadow stabilization, support for vehicle type-specific load models

This commit is contained in:
tmj-fstate
2017-11-12 20:02:36 +01:00
parent 5226fca281
commit 7fc1256b46
4 changed files with 43 additions and 11 deletions

View File

@@ -1924,7 +1924,8 @@ TDynamicObject::Init(std::string Name, // nazwa pojazdu, np. "EU07-424"
0.0f );
}
++compartmentindex;
} while( submodel != nullptr );
} while( ( submodel != nullptr )
|| ( compartmentindex < 2 ) ); // chain can start from prefix00 or prefix01
}
}
// wyszukiwanie zderzakow
@@ -4004,7 +4005,12 @@ void TDynamicObject::LoadMMediaFile(std::string BaseDir, std::string TypeName,
else {
// Ra: tu wczytywanie modelu ładunku jest w porządku
if( false == asLoadName.empty() ) {
mdLoad = TModelsManager::GetModel( asLoadName, true ); // ladunek
// try first specialized version of the load model, vehiclename_loadname
mdLoad = TModelsManager::GetModel( BaseDir + TypeName + "_" + MoverParameters->LoadType + ".t3d", true );
if( mdLoad == nullptr ) {
// if this fails, try generic load model
mdLoad = TModelsManager::GetModel( asLoadName, true );
}
}
}
}