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

build 171027: bounding area calculation fixes, novice ui obstacle indicator, minor traction render enhancement, shadow calculations for tall enough platforms

This commit is contained in:
tmj-fstate
2017-10-28 00:56:10 +02:00
parent d8c3b5caf4
commit 4ce975a656
23 changed files with 334 additions and 138 deletions

View File

@@ -1352,7 +1352,8 @@ TWorld::Update_UI() {
uitextline1 += " (paused)";
}
if( Controlled && ( Controlled->Mechanik != nullptr ) ) {
if( ( Controlled != nullptr )
&& ( Controlled->Mechanik != nullptr ) ) {
auto const &mover = Controlled->MoverParameters;
auto const &driver = Controlled->Mechanik;
@@ -1374,6 +1375,11 @@ TWorld::Update_UI() {
uitextline3 +=
" Pressure: " + to_string( mover->BrakePress * 100.0, 2 ) + " kPa"
+ " (train pipe: " + to_string( mover->PipePress * 100.0, 2 ) + " kPa)";
auto const trackblockdistance{ std::abs( Controlled->Mechanik->TrackBlock() ) };
if( trackblockdistance <= 75.0 ) {
uitextline4 = " Another vehicle ahead (distance: " + to_string( trackblockdistance, 1 ) + " m)";
}
}
}