16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 06:49:19 +02:00

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2019-01-01 00:25:18 +01:00
20 changed files with 564 additions and 512 deletions

View File

@@ -619,8 +619,12 @@ void
TDynamicObject::toggle_lights() {
if( true == SectionLightsActive ) {
// switch all lights off
// switch all lights off...
for( auto &section : Sections ) {
// ... but skip cab sections, their lighting ignores battery state
auto const sectionname { section.compartment->pName };
if( sectionname.find( "cab" ) == 0 ) { continue; }
section.light_level = 0.0f;
}
SectionLightsActive = false;