mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 08:09:19 +02:00
build 200731. empty vehicle load visualization support, basic inverter diagnostics, draw range limits bug fixes
This commit is contained in:
@@ -7988,6 +7988,7 @@ TMoverParameters::AssignLoad( std::string const &Name, float const Amount ) {
|
||||
|
||||
if( Name.empty() ) {
|
||||
// empty the vehicle if requested
|
||||
LoadTypeChange = ( LoadType.name != Name );
|
||||
LoadType = load_attributes();
|
||||
LoadAmount = 0.f;
|
||||
return true;
|
||||
@@ -7997,6 +7998,7 @@ TMoverParameters::AssignLoad( std::string const &Name, float const Amount ) {
|
||||
|
||||
for( auto const &loadattributes : LoadAttributes ) {
|
||||
if( Name == loadattributes.name ) {
|
||||
LoadTypeChange = ( LoadType.name != Name );
|
||||
LoadType = loadattributes;
|
||||
LoadAmount = clamp( Amount, 0.f, MaxLoad ) ;
|
||||
ComputeMass();
|
||||
|
||||
Reference in New Issue
Block a user