maintenance: minor code tweaks

This commit is contained in:
tmj-fstate
2019-09-10 23:38:13 +02:00
parent 2b1fe26265
commit dc688f08c3
3 changed files with 10 additions and 2 deletions

View File

@@ -5157,6 +5157,7 @@ void TTrain::OnCommand_cabchangebackward( TTrain *Train, command_data const &Com
1 :
-1 ) };
if( false == Train->CabChange( movedirection ) ) {
// current vehicle doesn't extend any farther in this direction, check if we there's one connected we can move to
auto const exitdirection { (
movedirection > 0 ?
end::front :
@@ -8035,7 +8036,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co
}
}
// TODO: move viable dedicated lights to the automatic light array
std::unordered_map<std::string, bool *> const autolights = {
std::unordered_map<std::string, bool const *> const autolights = {
{ "i-doorpermit_left:", &mvOccupied->Doors.instances[ ( mvOccupied->ActiveCab == 1 ? side::left : side::right ) ].open_permit },
{ "i-doorpermit_right:", &mvOccupied->Doors.instances[ ( mvOccupied->ActiveCab == 1 ? side::right : side::left ) ].open_permit },
{ "i-doorstep:", &mvOccupied->Doors.step_enabled }

View File

@@ -244,7 +244,7 @@ bool TTrackFollower::Move(double fDistance, bool bPrimary)
{ // gdy zostaje na tym samym torze (przesuwanie już nie zmienia toru)
if (bPrimary)
{ // tylko gdy początkowe ustawienie, dodajemy eventy stania do kolejki
if (Owner->MoverParameters->ActiveCab != 0) {
if (Owner->MoverParameters->CabNo != 0) {
pCurrentTrack->QueueEvents( pCurrentTrack->m_events1, Owner, -1.0 );
pCurrentTrack->QueueEvents( pCurrentTrack->m_events2, Owner, -1.0 );

View File

@@ -231,6 +231,13 @@ driverkeyboard_input::default_bindings() {
{ user_command::motorblowersdisableall, GLFW_KEY_M | keymodifier::control }
// coolingfanstoggle
// tempomattoggle
// springbraketoggle
// springbrakeenable
// springbrakedisable
// springbrakeshutofftoggle
// springbrakeshutoffenable
// springbrakeshutoffdisable
// springbrakerelease
};
}