diff --git a/CodeWalker/WorldForm.cs b/CodeWalker/WorldForm.cs index 6e91b15..dc9d1f6 100644 --- a/CodeWalker/WorldForm.cs +++ b/CodeWalker/WorldForm.cs @@ -4618,15 +4618,16 @@ namespace CodeWalker SnapGridSizeUpDown.Value = (decimal)s.SnapGridSize; SetRotationSnapping(s.SnapRotationDegrees); TimeOfDayTrackBar.Value = s.TimeOfDay; - setTime(s.TimeOfDay); LODLightsCheckBox.Checked = s.LODLights; WeatherComboBox.SelectedIndex = Math.Max(WeatherComboBox.FindString(s.Weather), 0); - Renderer.SetWeatherType(s.Weather); WeatherRegionComboBox.SelectedIndex = Math.Max(WeatherRegionComboBox.FindString(s.Region), 0); Renderer.individualcloudfrag = s.Clouds; NaturalAmbientLightCheckBox.Checked = s.NatrualAmbientLight; ArtificialAmbientLightCheckBox.Checked = s.ArtificialAmbientLight; + SetTimeOfDay(s.TimeOfDay); + Renderer.SetWeatherType(s.Weather); + EnableModsCheckBox.Checked = s.EnableMods; DlcLevelComboBox.Text = s.DLC; @@ -5782,6 +5783,17 @@ namespace CodeWalker + private void SetTimeOfDay(int minute) + { + float hour = minute / 60.0f; + UpdateTimeOfDayLabel(); + lock (Renderer.RenderSyncRoot) + { + Renderer.SetTimeOfDay(hour); + } + } + + @@ -7009,17 +7021,7 @@ namespace CodeWalker private void TimeOfDayTrackBar_Scroll(object sender, EventArgs e) { - setTime(TimeOfDayTrackBar.Value); - } - - private void setTime(int time) - { - float hour = time / 60.0f; - UpdateTimeOfDayLabel(); - lock (Renderer.RenderSyncRoot) - { - Renderer.SetTimeOfDay(hour); - } + SetTimeOfDay(TimeOfDayTrackBar.Value); } private void WeatherComboBox_SelectedIndexChanged(object sender, EventArgs e)