Reduce output log of weather

This commit is contained in:
nsubiron 2018-10-22 10:18:47 +02:00
parent 4b11973627
commit a4a8bcad27
2 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,7 @@ DECLARE_LOG_CATEGORY_EXTERN(LogCarlaServer, Log, All);
// #define CARLA_ROAD_GENERATOR_EXTRA_LOG
// #define CARLA_SERVER_EXTRA_LOG
// #define CARLA_TAGGER_EXTRA_LOG
// #define CARLA_WEATHER_EXTRA_LOG
#endif // WITH_EDITOR
class FCarlaModule : public IModuleInterface
@ -32,5 +33,5 @@ public:
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};

View File

@ -17,6 +17,8 @@ AWeather::AWeather(const FObjectInitializer& ObjectInitializer)
void AWeather::ApplyWeather(const FWeatherParameters &InWeather)
{
Weather = InWeather;
#ifdef CARLA_WEATHER_EXTRA_LOG
UE_LOG(LogCarla, Log, TEXT("Changing weather:"));
UE_LOG(LogCarla, Log, TEXT(" - Cloudyness = %.2f"), Weather.Cloudyness);
UE_LOG(LogCarla, Log, TEXT(" - Precipitation = %.2f"), Weather.Precipitation);
@ -24,6 +26,7 @@ void AWeather::ApplyWeather(const FWeatherParameters &InWeather)
UE_LOG(LogCarla, Log, TEXT(" - WindIntensity = %.2f"), Weather.WindIntensity);
UE_LOG(LogCarla, Log, TEXT(" - SunAzimuthAngle = %.2f"), Weather.SunAzimuthAngle);
UE_LOG(LogCarla, Log, TEXT(" - SunAltitudeAngle = %.2f"), Weather.SunAltitudeAngle);
#endif // CARLA_WEATHER_EXTRA_LOG
// Call the blueprint that actually changes the weather.
RefreshWeather(Weather);