mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
electro-pneumatic brake operation ai logic tweak, pantograph compressor valve state commands, automatic material update switch, train lights state readout for python scripts, minor bug fixes
This commit is contained in:
@@ -4034,17 +4034,19 @@ void opengl33_renderer::Update(double const Deltatime)
|
||||
}
|
||||
}
|
||||
|
||||
// update resources if there was environmental change
|
||||
simulation_state simulationstate {
|
||||
Global.Weather,
|
||||
Global.Season
|
||||
};
|
||||
std::swap( m_simulationstate, simulationstate );
|
||||
if( ( m_simulationstate.season != simulationstate.season ) && ( false == simulationstate.season.empty() ) ) {
|
||||
m_materials.on_season_change();
|
||||
}
|
||||
if( ( m_simulationstate.weather != simulationstate.weather ) && ( false == simulationstate.weather.empty() ) ) {
|
||||
m_materials.on_weather_change();
|
||||
if( Global.UpdateMaterials ) {
|
||||
// update resources if there was environmental change
|
||||
simulation_state simulationstate {
|
||||
Global.Weather,
|
||||
Global.Season
|
||||
};
|
||||
std::swap( m_simulationstate, simulationstate );
|
||||
if( ( m_simulationstate.season != simulationstate.season ) && ( false == simulationstate.season.empty() ) ) {
|
||||
m_materials.on_season_change();
|
||||
}
|
||||
if( ( m_simulationstate.weather != simulationstate.weather ) && ( false == simulationstate.weather.empty() ) ) {
|
||||
m_materials.on_weather_change();
|
||||
}
|
||||
}
|
||||
|
||||
if ((true == Global.ResourceSweep) && (true == simulation::is_ready))
|
||||
|
||||
Reference in New Issue
Block a user