mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 01:19:18 +02: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:
@@ -4078,17 +4078,19 @@ opengl_renderer::Update( double const Deltatime ) {
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
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 )
|
||||
|
||||
Reference in New Issue
Block a user