diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp index 7b08026d8..d028a3f75 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp @@ -24,7 +24,7 @@ AWeather::AWeather(const FObjectInitializer& ObjectInitializer) RootComponent = ObjectInitializer.CreateDefaultSubobject(this, TEXT("RootComponent")); } -static void CheckWeatherPostProcessEffects(AWeather& self) +void AWeather::CheckWeatherPostProcessEffects() { if (Weather.Precipitation > 0.0f) ActiveBlendables.Add(MakeTuple(PrecipitationPostProcessMaterial, Weather.Precipitation / 100.0f)); @@ -55,7 +55,7 @@ static void CheckWeatherPostProcessEffects(AWeather& self) void AWeather::ApplyWeather(const FWeatherParameters &InWeather) { SetWeather(InWeather); - CheckWeatherPostProcessEffects(*this); + CheckWeatherPostProcessEffects(); #ifdef CARLA_WEATHER_EXTRA_LOG UE_LOG(LogCarla, Log, TEXT("Changing weather:")); @@ -85,7 +85,7 @@ void AWeather::NotifyWeather(ASensor* Sensor) if (AsSceneCaptureCamera != nullptr) Sensors.Add(AsSceneCaptureCamera); - CheckWeatherPostProcessEffects(*this); + CheckWeatherPostProcessEffects(); // Call the blueprint that actually changes the weather. RefreshWeather(Weather); diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.h index a05c3016d..efdd5d499 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.h @@ -58,6 +58,8 @@ protected: private: + void CheckWeatherPostProcessEffects(); + UPROPERTY(VisibleAnywhere) FWeatherParameters Weather;