mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-30 10:15:36 +01:00
Fix OpenGL invalidation breaking for weather effects, they start before
This commit is contained in:
@@ -362,7 +362,7 @@ public:
|
||||
{
|
||||
WindowResetVisibilities();
|
||||
|
||||
if (ClimateIsRaining() || ClimateIsSnowing() || ClimateIsSnowingHeavily())
|
||||
if (ClimateHasWeatherEffect())
|
||||
{
|
||||
WindowUpdateAllViewports();
|
||||
// OpenGL doesn't support restoring pixels, always redraw.
|
||||
|
||||
@@ -288,6 +288,13 @@ bool WeatherIsDry(WeatherType weather)
|
||||
return weather == WeatherType::Sunny || weather == WeatherType::PartiallyCloudy || weather == WeatherType::Cloudy;
|
||||
}
|
||||
|
||||
bool ClimateHasWeatherEffect()
|
||||
{
|
||||
const auto& weatherCurrent = getGameState().weatherCurrent;
|
||||
// The game starts drawing rain whenever this level is not none.
|
||||
return weatherCurrent.level != WeatherLevel::None;
|
||||
}
|
||||
|
||||
FilterPaletteID ClimateGetWeatherGloomPaletteId(const WeatherState& state)
|
||||
{
|
||||
auto paletteId = FilterPaletteID::PaletteNull;
|
||||
|
||||
@@ -92,5 +92,6 @@ bool ClimateTransitioningToSnow();
|
||||
bool ClimateIsSnowing();
|
||||
bool ClimateIsSnowingHeavily();
|
||||
bool WeatherIsDry(WeatherType);
|
||||
bool ClimateHasWeatherEffect();
|
||||
FilterPaletteID ClimateGetWeatherGloomPaletteId(const WeatherState& state);
|
||||
uint32_t ClimateGetWeatherSpriteId(const WeatherType weatherType);
|
||||
|
||||
Reference in New Issue
Block a user