vehicle heating system tweaks, vehicle destination sign system enhancements

This commit is contained in:
tmj-fstate
2019-03-31 21:47:40 +02:00
parent 9bca179752
commit 1ced1239e0
8 changed files with 149 additions and 45 deletions

View File

@@ -789,6 +789,27 @@ int TSubModel::count_children() {
1 + Child->count_siblings() );
}
// locates submodel mapped with replacable -4
std::tuple<TSubModel *, bool>
TSubModel::find_replacable4() {
if( m_material == -4 ) {
return std::make_tuple( this, ( fLight != -1.0 ) );
}
if( Next != nullptr ) {
auto lookup { Next->find_replacable4() };
if( std::get<TSubModel *>( lookup ) != nullptr ) { return lookup; }
}
if( Child != nullptr ) {
auto lookup { Child->find_replacable4() };
if( std::get<TSubModel *>( lookup ) != nullptr ) { return lookup; }
}
return std::make_tuple( nullptr, false );
}
int TSubModel::FlagsCheck()
{ // analiza koniecznych zmian pomiędzy submodelami
// samo pomijanie glBindTexture() nie poprawi wydajności