diff --git a/McZapkie/Mover.cpp b/McZapkie/Mover.cpp index b5c49557..38b057c1 100644 --- a/McZapkie/Mover.cpp +++ b/McZapkie/Mover.cpp @@ -4544,6 +4544,7 @@ void TMoverParameters::UpdatePipePressure(double dt) } if (dpMainValve < 0) // && (PipePressureVal > 0.01) //50 + { if (Compressor > ScndPipePress) { CompressedVolume = CompressedVolume + dpMainValve / 1500.0; @@ -4551,6 +4552,7 @@ void TMoverParameters::UpdatePipePressure(double dt) } else Pipe2->Flow(dpMainValve); + } } // ulepszony hamulec bezp. @@ -4625,10 +4627,12 @@ void TMoverParameters::UpdatePipePressure(double dt) //(Hamulec as TLSt).SetLBP(LocBrakePress); Hamulec->SetLBP(LocBrakePress); if (BrakeValve == TBrakeValve::EStED) + { if (MBPM < 2) Hamulec->PLC(MaxBrakePress[LoadFlag]); else Hamulec->PLC(TotalMass - Mred); + } break; } diff --git a/McZapkie/hamulce.cpp b/McZapkie/hamulce.cpp index 0e8610dc..e62c1f7a 100644 --- a/McZapkie/hamulce.cpp +++ b/McZapkie/hamulce.cpp @@ -833,12 +833,14 @@ void TESt::CheckReleaser(double const dt) // odluzniacz if ((BrakeStatus & b_rls) == b_rls) + { if (CVP - VVP < 0) BrakeStatus &= ~b_rls; else { CntrlRes->Flow(+PF(CVP, 0, 0.1) * dt); } + } } /// @@ -2468,10 +2470,12 @@ void TKE::CheckReleaser(double const dt) // odluzniacz if (true == ((BrakeStatus & b_rls) == b_rls)) + { if (CVP - VVP < 0) BrakeStatus &= ~b_rls; else CntrlRes->Flow(+PF(CVP, 0, 0.1) * dt); + } } /// @@ -3821,6 +3825,7 @@ double TM394::GetPF(double i_bcp, double PP, double HP, double dt, double ep) if (BCP == 0) LimPP = LimPP + RedAdj; if (BCP != 2) + { if (CP < LimPP) CP = CP + 4 * std::min(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt; // zbiornik sterujacy // cp:=cp+6*(2+int(bcp<0))*std::min(abs(Limpp-cp),0.05)*PR(cp,Limpp)*dt //zbiornik @@ -3829,6 +3834,7 @@ double TM394::GetPF(double i_bcp, double PP, double HP, double dt, double ep) CP = CP - 0.2 * dt / 100; else CP = CP + 4 * (1 + int(BCP != 3) + int(BCP > 4)) * std::min(abs(LimPP - CP), 0.05) * PR(CP, LimPP) * dt; // zbiornik sterujacy + } LimPP = CP; dpPipe = std::min(HP, LimPP); diff --git a/vehicle/Train.cpp b/vehicle/Train.cpp index 56eeef15..ee98ff09 100644 --- a/vehicle/Train.cpp +++ b/vehicle/Train.cpp @@ -10721,6 +10721,7 @@ void TTrain::DynamicSet(TDynamicObject *d) mvControlled = DynamicObject->FindPowered()->MoverParameters; mvSecond = nullptr; // gdyby się nic nie znalazło if (mvOccupied->Power > 1.0) // dwuczłonowe lub ukrotnienia, żeby nie szukać każdorazowo + { if (mvOccupied->Couplers[1].Connected ? mvOccupied->Couplers[1].AllowedFlag & coupling::control : false) { // gdy jest człon od sprzęgu 1, a sprzęg łączony // warsztatowo (powiedzmy) @@ -10733,6 +10734,7 @@ void TTrain::DynamicSet(TDynamicObject *d) if (mvOccupied->Couplers[0].Connected->Power > 1.0) // ale ten drugi ma moc mvSecond = mvOccupied->Couplers[0].Connected; // wskaźnik na drugiego } + } // cache nearest unit equipped with pantographs { auto *lookup{DynamicObject->FindPantographCarrier()};