16
0
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:
tmj-fstate
2020-08-02 18:27:22 +02:00
parent e74a614385
commit f2110ced25
6 changed files with 31 additions and 42 deletions

View File

@@ -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();