16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 11:39:19 +02:00

application component state switches, chromatic aberration post process filter, minor ai logic tweaks, minor cab controls tweaks, minor bug fixes

This commit is contained in:
tmj-fstate
2020-03-01 03:16:12 +01:00
parent 642b8fb623
commit 09ad3dbacd
13 changed files with 254 additions and 200 deletions

View File

@@ -2281,7 +2281,7 @@ bool TMoverParameters::IncScndCtrl(int CtrlSpeed)
{
bool OK = false;
if ((IsMainCtrlNoPowerPos()) && (CabActive != 0) && (TrainType == dt_ET42) && (ScndCtrlPos == 0) && (DynamicBrakeFlag))
if ( ( DynamicBrakeFlag ) && ( TrainType == dt_ET42 ) && ( CabActive != 0 ) && ( IsMainCtrlNoPowerPos() ) && ( ScndCtrlPos == 0 ) )
{
OK = DynamicBrakeSwitch(false);
}
@@ -2291,18 +2291,23 @@ bool TMoverParameters::IncScndCtrl(int CtrlSpeed)
{
// if (RList[MainCtrlPos].R=0) and (MainCtrlPos>0) and (ScndCtrlPos<ScndCtrlPosNo) and
// (not CoupledCtrl) then
if ((ScndCtrlPos < ScndCtrlPosNo) && (!CoupledCtrl) &&
((EngineType != TEngineType::DieselElectric) || (!AutoRelayFlag)))
if ((ScndCtrlPos < ScndCtrlPosNo) && (!CoupledCtrl))
{
if (CtrlSpeed == 1)
{
ScndCtrlPos++;
// TBD, TODO: refactor this validation as part of relay check routine (currently in tractionforce()
// TBD, TODO: diesel electric engine utilize scndctrlactualpos like the other types?
if( ( EngineType == TEngineType::DieselElectric )
&& ( ( IsMainCtrlNoPowerPos() ) || ( AutoRelayFlag ) || ( ShuntMode ) || ( false == Mains ) ) ) {
OK = false;
}
else if (CtrlSpeed > 1)
{
ScndCtrlPos = ScndCtrlPosNo; // takie chamskie, potem poprawie
else {
if( CtrlSpeed == 1 ) {
ScndCtrlPos++;
}
else if( CtrlSpeed > 1 ) {
ScndCtrlPos = ScndCtrlPosNo; // takie chamskie, potem poprawie
}
OK = true;
}
OK = true;
}
else // nie mozna zmienic
OK = false;