diff --git a/src/Features/WeatherEditor.cpp b/src/Features/WeatherEditor.cpp index aea717af79..7611dc03fc 100644 --- a/src/Features/WeatherEditor.cpp +++ b/src/Features/WeatherEditor.cpp @@ -135,8 +135,8 @@ void WeatherEditor::LerpWeather(RE::TESWeather* oldWeather, RE::TESWeather* newW newWeather->data.precipitationEndFadeOut = LerpUint8_t(oldWeather->data.precipitationEndFadeOut, newWeather->data.precipitationEndFadeOut, currentWeatherPct); //// Sun - newWeather->data.sunDamage = LerpInt8_t(oldWeather->data.sunDamage, newWeather->data.sunDamage, currentWeatherPct); - newWeather->data.sunGlare = LerpInt8_t(oldWeather->data.sunGlare, newWeather->data.sunGlare, currentWeatherPct); + newWeather->data.sunDamage = LerpUint8_t(oldWeather->data.sunDamage, newWeather->data.sunDamage, currentWeatherPct); + newWeather->data.sunGlare = LerpUint8_t(oldWeather->data.sunGlare, newWeather->data.sunGlare, currentWeatherPct); //// Lightning newWeather->data.thunderLightningBeginFadeIn = LerpUint8_t(oldWeather->data.thunderLightningBeginFadeIn, newWeather->data.thunderLightningBeginFadeIn, currentWeatherPct); diff --git a/src/WeatherEditor/Weather/WeatherWidget.cpp b/src/WeatherEditor/Weather/WeatherWidget.cpp index 1b25cf7b37..575dc7738e 100644 --- a/src/WeatherEditor/Weather/WeatherWidget.cpp +++ b/src/WeatherEditor/Weather/WeatherWidget.cpp @@ -170,7 +170,7 @@ void WeatherWidget::DrawWidget() if (ImGui::BeginTabItem("Basic", nullptr, basicFlags)) { BeginScrollableContent("##BasicScroll"); - DrawProperties("Sun", { { "Sun Damage", INT8_SLIDER } }); + DrawProperties("Sun", { { "Sun Damage", UINT8_SLIDER } }); DrawProperties("Wind", { { "Wind Speed", UINT8_SLIDER }, { "Wind Direction", INT8_SLIDER }, { "Wind Direction Range", INT8_SLIDER } }); DrawProperties("Precipitation", { { "Precipitation Begin Fade In", UINT8_SLIDER }, { "Precipitation End Fade Out", UINT8_SLIDER } }); DrawProperties("Lightning", { { "Thunder Lightning Begin Fade In", UINT8_SLIDER }, { "Thunder Lightning End Fade Out", UINT8_SLIDER }, @@ -561,8 +561,8 @@ void WeatherWidget::SetWeatherValues() weather->data.transDelta = (uint8_t)weatherProps["Trans Delta"]; // Sun - data.sunGlare = (int8_t)weatherProps["Sun Glare"]; - data.sunDamage = (int8_t)weatherProps["Sun Damage"]; + data.sunGlare = (uint8_t)weatherProps["Sun Glare"]; + data.sunDamage = (uint8_t)weatherProps["Sun Damage"]; // Precipitation data.precipitationBeginFadeIn = (uint8_t)weatherProps["Precipitation Begin Fade In"]; @@ -1240,11 +1240,11 @@ void WeatherWidget::DrawFogSettings() ImGui::Text("Near"); ImGui::TableSetColumnIndex(1); ImGui::SetNextItemWidth(-1); - if (ImGui::SliderFloat("##FogDayNear", &settings.fogProperties["Day Near"], 0.0f, 1000000.0f, "%.0f")) + if (ImGui::SliderFloat("##FogDayNear", &settings.fogProperties["Day Near"], 0.0f, 350000.0f, "%.0f")) changed = true; ImGui::TableSetColumnIndex(2); ImGui::SetNextItemWidth(-1); - if (ImGui::SliderFloat("##FogNightNear", &settings.fogProperties["Night Near"], 0.0f, 1000000.0f, "%.0f")) + if (ImGui::SliderFloat("##FogNightNear", &settings.fogProperties["Night Near"], 0.0f, 350000.0f, "%.0f")) changed = true; // Far @@ -1268,11 +1268,11 @@ void WeatherWidget::DrawFogSettings() ImGui::Text("Far"); ImGui::TableSetColumnIndex(1); ImGui::SetNextItemWidth(-1); - if (ImGui::SliderFloat("##FogDayFar", &settings.fogProperties["Day Far"], 0.0f, 1000000.0f, "%.0f")) + if (ImGui::SliderFloat("##FogDayFar", &settings.fogProperties["Day Far"], 0.0f, 350000.0f, "%.0f")) changed = true; ImGui::TableSetColumnIndex(2); ImGui::SetNextItemWidth(-1); - if (ImGui::SliderFloat("##FogNightFar", &settings.fogProperties["Night Far"], 0.0f, 1000000.0f, "%.0f")) + if (ImGui::SliderFloat("##FogNightFar", &settings.fogProperties["Night Far"], 0.0f, 350000.0f, "%.0f")) changed = true; // Power