mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
minor bug fixes
This commit is contained in:
@@ -1017,7 +1017,9 @@ logvalues_event::export_as_text_( std::ostream &Output ) const {
|
||||
void
|
||||
multi_event::init() {
|
||||
|
||||
init_targets( simulation::Memory, "memory cell" );
|
||||
auto const conditiontchecksmemcell { m_conditions.flags & ( flags::text | flags::value_1 | flags::value_2 ) };
|
||||
// not all multi-events have memory cell checks, for the ones which don't we can keep quiet about it
|
||||
init_targets( simulation::Memory, "memory cell", ( false == conditiontchecksmemcell ) );
|
||||
if( m_ignored ) {
|
||||
// legacy compatibility behaviour, instead of disabling the event we disable the memory cell comparison test
|
||||
m_conditions.flags &= ~( flags::text | flags::value_1 | flags::value_2 );
|
||||
|
||||
14
Train.cpp
14
Train.cpp
@@ -1325,9 +1325,11 @@ void TTrain::OnCommand_trainbrakeoperationmodeincrease(TTrain *Train, command_da
|
||||
// audio feedback
|
||||
Train->dsbPneumaticSwitch.play();
|
||||
// visual feedback
|
||||
// NOTE: there's no button for brake operation mode switch
|
||||
// TBD, TODO: add brake operation mode switch?
|
||||
}
|
||||
Train->ggBrakeOperationModeCtrl.UpdateValue(
|
||||
Train->mvOccupied->BrakeOpModeFlag > 0 ?
|
||||
std::log2( Train->mvOccupied->BrakeOpModeFlag ) :
|
||||
0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1341,8 +1343,10 @@ void TTrain::OnCommand_trainbrakeoperationmodedecrease(TTrain *Train, command_da
|
||||
// audio feedback
|
||||
Train->dsbPneumaticSwitch.play();
|
||||
// visual feedback
|
||||
// NOTE: there's no button for brake operation mode switch
|
||||
// TBD, TODO: add brake operation mode switch?
|
||||
Train->ggBrakeOperationModeCtrl.UpdateValue(
|
||||
Train->mvOccupied->BrakeOpModeFlag > 0 ?
|
||||
std::log2( Train->mvOccupied->BrakeOpModeFlag ) :
|
||||
0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
scene.cpp
11
scene.cpp
@@ -233,7 +233,8 @@ basic_cell::deserialize( std::istream &Input ) {
|
||||
}
|
||||
// cell activation flag
|
||||
m_active = (
|
||||
( false == m_shapesopaque.empty() )
|
||||
( true == m_active )
|
||||
|| ( false == m_shapesopaque.empty() )
|
||||
|| ( false == m_shapestranslucent.empty() )
|
||||
|| ( false == m_lines.empty() ) );
|
||||
}
|
||||
@@ -1091,12 +1092,12 @@ basic_region::deserialize( std::string const &Scenariofile ) {
|
||||
auto sectioncount { sn_utils::ld_uint32( input ) };
|
||||
while( sectioncount-- ) {
|
||||
// section index, followed by section data size, followed by section data
|
||||
auto *§ion { m_sections[ sn_utils::ld_uint32( input ) ] };
|
||||
auto const sectionindex { sn_utils::ld_uint32( input ) };
|
||||
auto const sectionsize { sn_utils::ld_uint32( input ) };
|
||||
if( section == nullptr ) {
|
||||
section = new basic_section();
|
||||
if( m_sections[ sectionindex ] == nullptr ) {
|
||||
m_sections[ sectionindex ] = new basic_section();
|
||||
}
|
||||
section->deserialize( input );
|
||||
m_sections[ sectionindex ]->deserialize( input );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user