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

minor bug fixes

This commit is contained in:
tmj-fstate
2018-09-23 21:37:29 +02:00
parent 001d202055
commit 3d64d7fb9f
4 changed files with 19 additions and 12 deletions

View File

@@ -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 );

View File

@@ -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 );
} }
} }
} }

View File

@@ -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 *&section { 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;

View File

@@ -2,4 +2,4 @@
#define VERSION_MAJOR 18 #define VERSION_MAJOR 18
#define VERSION_MINOR 923 #define VERSION_MINOR 923
#define VERSION_REVISION 0 #define VERSION_REVISION 1