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

universal controller configuration fix, opengl 3.3 renderer headlights cone tweak

This commit is contained in:
tmj-fstate
2020-01-04 17:55:08 +01:00
parent 93ef01142c
commit bebb413c31
3 changed files with 17 additions and 5 deletions

View File

@@ -2189,7 +2189,7 @@ int TMoverParameters::MainCtrlNoPowerPos() const {
switch( EIMCtrlType ) {
case 1: { return 3; }
case 2: { return 3; }
case 3: { return 3; }
case 3: { return UniCtrlNoPowerPos; }
default: { return 0; }
}
}
@@ -10653,6 +10653,15 @@ bool TMoverParameters::CheckLocomotiveParameters(bool ReadyFlag, int Dir)
// WriteLogSS("OK=", BoolTo10(OK));
// WriteLog("");
if( EIMCtrlType == 3 ) {
for( auto idx = 0; idx < MainCtrlPosNo; ++idx ) {
if( UniCtrlList[ idx ].MaxCtrlVal > 0.0 ) {
UniCtrlNoPowerPos = std::max( 0, ( idx - 1 ) );
break;
}
}
}
return OK;
}