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

build 170825. tweaks and fixes to AI brake handling, scan table distance calculation fix

This commit is contained in:
tmj-fstate
2017-08-25 21:06:43 +02:00
parent 42aab52038
commit 110bdf63bb
5 changed files with 138 additions and 163 deletions

View File

@@ -1314,7 +1314,7 @@ TWorld::Update_UI() {
else if( mover->ActiveDir < 0 ) { uitextline2 += " R"; }
else { uitextline2 += " N"; }
uitextline3 = "Brakes:" + to_string( mover->fBrakeCtrlPos, 1, 5 ) + "+" + std::to_string( mover->LocalBrakePos );
uitextline3 = "Brakes:" + to_string( mover->fBrakeCtrlPos, 1, 5 ) + "+" + std::to_string( mover->LocalBrakePos ) + ( mover->SlippingWheels ? " !" : " " );
if( Global::iScreenMode[ Global::iTextMode - GLFW_KEY_F1 ] == 1 ) {
// detail mode on second key press
@@ -1324,7 +1324,7 @@ TWorld::Update_UI() {
+ ", next limit: " + std::to_string( static_cast<int>( std::floor( Controlled->Mechanik->VelNext ) ) ) + " km/h"
+ " in " + to_string( Controlled->Mechanik->ActualProximityDist * 0.001, 1 ) + " km)";
uitextline3 +=
" Pressure: " + to_string( mover->BrakePress * 100.0, 2 ) + " kPa"
" Pressure: " + to_string( mover->BrakePress * 100.0, 2 ) + " kPa"
+ " (train pipe: " + to_string( mover->PipePress * 100.0, 2 ) + " kPa)";
}
}
@@ -1342,7 +1342,7 @@ TWorld::Update_UI() {
if( tmp == nullptr ) { break; }
// if the nearest located vehicle doesn't have a direct driver, try to query its owner
auto const owner = (
tmp->Mechanik != nullptr ?
( ( tmp->Mechanik != nullptr ) && ( tmp->Mechanik->Primary() ) ) ?
tmp->Mechanik :
tmp->ctOwner );
if( owner == nullptr ){ break; }