mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02:00
maintenance: minor code tweaks
This commit is contained in:
@@ -5157,6 +5157,7 @@ void TTrain::OnCommand_cabchangebackward( TTrain *Train, command_data const &Com
|
|||||||
1 :
|
1 :
|
||||||
-1 ) };
|
-1 ) };
|
||||||
if( false == Train->CabChange( movedirection ) ) {
|
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 { (
|
auto const exitdirection { (
|
||||||
movedirection > 0 ?
|
movedirection > 0 ?
|
||||||
end::front :
|
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
|
// 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_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-doorpermit_right:", &mvOccupied->Doors.instances[ ( mvOccupied->ActiveCab == 1 ? side::right : side::left ) ].open_permit },
|
||||||
{ "i-doorstep:", &mvOccupied->Doors.step_enabled }
|
{ "i-doorstep:", &mvOccupied->Doors.step_enabled }
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ bool TTrackFollower::Move(double fDistance, bool bPrimary)
|
|||||||
{ // gdy zostaje na tym samym torze (przesuwanie już nie zmienia toru)
|
{ // gdy zostaje na tym samym torze (przesuwanie już nie zmienia toru)
|
||||||
if (bPrimary)
|
if (bPrimary)
|
||||||
{ // tylko gdy początkowe ustawienie, dodajemy eventy stania do kolejki
|
{ // 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_events1, Owner, -1.0 );
|
||||||
pCurrentTrack->QueueEvents( pCurrentTrack->m_events2, Owner, -1.0 );
|
pCurrentTrack->QueueEvents( pCurrentTrack->m_events2, Owner, -1.0 );
|
||||||
|
|||||||
@@ -231,6 +231,13 @@ driverkeyboard_input::default_bindings() {
|
|||||||
{ user_command::motorblowersdisableall, GLFW_KEY_M | keymodifier::control }
|
{ user_command::motorblowersdisableall, GLFW_KEY_M | keymodifier::control }
|
||||||
// coolingfanstoggle
|
// coolingfanstoggle
|
||||||
// tempomattoggle
|
// tempomattoggle
|
||||||
|
// springbraketoggle
|
||||||
|
// springbrakeenable
|
||||||
|
// springbrakedisable
|
||||||
|
// springbrakeshutofftoggle
|
||||||
|
// springbrakeshutoffenable
|
||||||
|
// springbrakeshutoffdisable
|
||||||
|
// springbrakerelease
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user