Add blendable check in NotifyWeather too.

This commit is contained in:
MarcelPiNacy 2022-07-27 17:19:10 +02:00 committed by bernat
parent dd7d7857a4
commit 89303a4a47
1 changed files with 10 additions and 0 deletions

View File

@ -83,6 +83,16 @@ void AWeather::NotifyWeather(ASensor* Sensor)
Sensors.Add(AsSceneCaptureCamera);
#endif
if (Weather.Precipitation > 0.0f)
ActiveBlendables.Add(MakeTuple(PrecipitationPostProcessMaterial, Weather.Precipitation / 100.0f));
else
ActiveBlendables.Remove(PrecipitationPostProcessMaterial);
if (Weather.DustStorm > 0.0f)
ActiveBlendables.Add(MakeTuple(DustStormPostProcessMaterial, Weather.DustStorm / 100.0f));
else
ActiveBlendables.Remove(DustStormPostProcessMaterial);
// Call the blueprint that actually changes the weather.
RefreshWeather(Weather);
}