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

build 181005. automatic switch trackbed generation

This commit is contained in:
tmj-fstate
2018-10-05 21:57:49 +02:00
parent 682514fe7b
commit 8b1a26632d
12 changed files with 879 additions and 784 deletions

View File

@@ -6640,15 +6640,14 @@ TMoverParameters::AssignLoad( std::string const &Name, float const Amount ) {
}
}
// can't mix load types, at least for the time being
if( ( LoadAmount > 0 ) && ( LoadType.name != Name ) ) { return false; }
if( Name.empty() ) {
// empty the vehicle
// empty the vehicle if requested
LoadType = load_attributes();
LoadAmount = 0.f;
return true;
}
// can't mix load types, at least for the time being
if( ( LoadAmount > 0 ) && ( LoadType.name != Name ) ) { return false; }
for( auto const &loadattributes : LoadAttributes ) {
if( Name == loadattributes.name ) {