build 170508. fixes for local brake use and 3-way crossroad setup

This commit is contained in:
tmj-fstate
2017-05-08 22:41:56 +02:00
parent 3203ad1f6c
commit 54fc93f6e5
8 changed files with 87 additions and 42 deletions

View File

@@ -2232,8 +2232,9 @@ bool TController::IncBrake()
OK = mvOccupied->IncLocalBrakeLevel( std::floor( 1.5 + std::abs( AccDesired ) ) );
break;
case Pneumatic:
if ((mvOccupied->Couplers[0].Connected == NULL) &&
(mvOccupied->Couplers[1].Connected == NULL))
// NOTE: can't perform just test whether connected vehicle == nullptr, due to virtual couplers formed with nearby vehicles
if ((mvOccupied->Couplers[0].CouplingFlag == 0) &&
(mvOccupied->Couplers[1].CouplingFlag == 0))
OK = mvOccupied->IncLocalBrakeLevel(
1 + static_cast<int>( std::floor( 0.5 + std::fabs(AccDesired))) ); // hamowanie lokalnym bo luzem jedzie
else