mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 01:59:19 +02:00
Repair of St133 drivers' valve for both player and AI
This commit is contained in:
committed by
tmj-fstate
parent
750e9a21a6
commit
fa9136e333
16
Driver.cpp
16
Driver.cpp
@@ -3197,15 +3197,15 @@ bool TController::DecBrake() {
|
||||
clamp( -AccDesired / AccMax * mvOccupied->AIHintLocalBrakeAccFactor, 0.0, 1.0 ) ) );
|
||||
OK = ( mvOccupied->fBrakeCtrlPos != initialbrakeposition );
|
||||
}
|
||||
else if( mvOccupied->fBrakeCtrlPos != mvOccupied->Handle->GetPos( bh_EPR ) ) {
|
||||
mvOccupied->BrakeLevelSet(mvOccupied->Handle->GetPos(bh_EPR));
|
||||
if( mvOccupied->Handle->GetPos( bh_EPR ) - mvOccupied->Handle->GetPos( bh_EPN ) < 0.1 ) {
|
||||
mvOccupied->SwitchEPBrake( 1 );
|
||||
}
|
||||
OK = true;
|
||||
}
|
||||
else {
|
||||
OK = false;
|
||||
OK = false;
|
||||
if (mvOccupied->fBrakeCtrlPos != mvOccupied->Handle->GetPos(bh_EPR)) {
|
||||
mvOccupied->BrakeLevelSet(mvOccupied->Handle->GetPos(bh_EPR));
|
||||
OK = true;
|
||||
}
|
||||
if (mvOccupied->Handle->GetPos(bh_EPR) - mvOccupied->Handle->GetPos(bh_EPN) < 0.1) {
|
||||
OK = OK || mvOccupied->SwitchEPBrake(1);
|
||||
}
|
||||
}
|
||||
if( !OK ) {
|
||||
OK = mvOccupied->DecLocalBrakeLevel( 2 );
|
||||
|
||||
@@ -3135,7 +3135,7 @@ double TSt113::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
|
||||
|
||||
BCP = lround(i_bcp);
|
||||
|
||||
EPS = BEP_K[BCP];
|
||||
EPS = BEP_K[BCP+1];
|
||||
|
||||
if (BCP > 0)
|
||||
BCP = BCP - 1;
|
||||
|
||||
Reference in New Issue
Block a user