mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
minor bug fixes
This commit is contained in:
@@ -1017,7 +1017,9 @@ logvalues_event::export_as_text_( std::ostream &Output ) const {
|
|||||||
void
|
void
|
||||||
multi_event::init() {
|
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 ) {
|
if( m_ignored ) {
|
||||||
// legacy compatibility behaviour, instead of disabling the event we disable the memory cell comparison test
|
// 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 );
|
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
|
// audio feedback
|
||||||
Train->dsbPneumaticSwitch.play();
|
Train->dsbPneumaticSwitch.play();
|
||||||
// visual feedback
|
// visual feedback
|
||||||
// NOTE: there's no button for brake operation mode switch
|
Train->ggBrakeOperationModeCtrl.UpdateValue(
|
||||||
// TBD, TODO: add brake operation mode switch?
|
Train->mvOccupied->BrakeOpModeFlag > 0 ?
|
||||||
}
|
std::log2( Train->mvOccupied->BrakeOpModeFlag ) :
|
||||||
|
0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1341,8 +1343,10 @@ void TTrain::OnCommand_trainbrakeoperationmodedecrease(TTrain *Train, command_da
|
|||||||
// audio feedback
|
// audio feedback
|
||||||
Train->dsbPneumaticSwitch.play();
|
Train->dsbPneumaticSwitch.play();
|
||||||
// visual feedback
|
// visual feedback
|
||||||
// NOTE: there's no button for brake operation mode switch
|
Train->ggBrakeOperationModeCtrl.UpdateValue(
|
||||||
// TBD, TODO: add brake operation mode switch?
|
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
|
// cell activation flag
|
||||||
m_active = (
|
m_active = (
|
||||||
( false == m_shapesopaque.empty() )
|
( true == m_active )
|
||||||
|
|| ( false == m_shapesopaque.empty() )
|
||||||
|| ( false == m_shapestranslucent.empty() )
|
|| ( false == m_shapestranslucent.empty() )
|
||||||
|| ( false == m_lines.empty() ) );
|
|| ( false == m_lines.empty() ) );
|
||||||
}
|
}
|
||||||
@@ -1091,12 +1092,12 @@ basic_region::deserialize( std::string const &Scenariofile ) {
|
|||||||
auto sectioncount { sn_utils::ld_uint32( input ) };
|
auto sectioncount { sn_utils::ld_uint32( input ) };
|
||||||
while( sectioncount-- ) {
|
while( sectioncount-- ) {
|
||||||
// section index, followed by section data size, followed by section data
|
// 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 ) };
|
auto const sectionsize { sn_utils::ld_uint32( input ) };
|
||||||
if( section == nullptr ) {
|
if( m_sections[ sectionindex ] == nullptr ) {
|
||||||
section = new basic_section();
|
m_sections[ sectionindex ] = new basic_section();
|
||||||
}
|
}
|
||||||
section->deserialize( input );
|
m_sections[ sectionindex ]->deserialize( input );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user