mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
vehicle heating system tweaks, vehicle destination sign system enhancements
This commit is contained in:
21
Model3d.cpp
21
Model3d.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user