mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 10:50:28 +01:00
Copy the textures of the terrain layers again when the season or the weather changes
This commit is contained in:
@@ -7417,11 +7417,18 @@ void opengl46_renderer::Update(double const Deltatime)
|
||||
Global.Season
|
||||
};
|
||||
std::swap( m_simulationstate, simulationstate );
|
||||
bool changed { false };
|
||||
if( ( m_simulationstate.season != simulationstate.season ) && ( false == simulationstate.season.empty() ) ) {
|
||||
m_materials.on_season_change();
|
||||
changed = true;
|
||||
}
|
||||
if( ( m_simulationstate.weather != simulationstate.weather ) && ( false == simulationstate.weather.empty() ) ) {
|
||||
m_materials.on_weather_change();
|
||||
changed = true;
|
||||
}
|
||||
if( changed ) {
|
||||
// the heightmap terrain keeps copies of the textures of its layer materials
|
||||
m_terrainmaterials.on_environment_change();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user