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

basic cargo attributes system, minor cargo enhancements and fixes

This commit is contained in:
tmj-fstate
2018-09-19 19:12:53 +02:00
parent 4c7d254539
commit 38591a09f2
8 changed files with 253 additions and 245 deletions

View File

@@ -79,12 +79,12 @@ TSubModel::SetLightLevel( float const Level, bool const Includechildren, bool co
if( true == Includesiblings ) {
auto sibling { this };
while( ( sibling = sibling->Next ) != nullptr ) {
sibling->f4Emision.a = Level;
sibling->SetLightLevel( Level, Includechildren, false ); // no need for all siblings to duplicate the work
}
}
if( ( true == Includechildren )
&& ( Child != nullptr ) ) {
Child->SetLightLevel( Level, true, true ); // node's children include child's siblings and children
Child->SetLightLevel( Level, Includechildren, true ); // node's children include child's siblings and children
}
}