From f23b74904bdcd3fd49df77dc8a548b40a693561b Mon Sep 17 00:00:00 2001 From: Thorsten Renk Date: Mon, 20 May 2019 10:13:55 +0300 Subject: [PATCH] AW provides option to set a localized turbulence field around active volcano --- Environment/volcanoes.xml | 1 + Nasal/local_weather/local_weather.nas | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Environment/volcanoes.xml b/Environment/volcanoes.xml index 11aa3486a..b9ffb4726 100644 --- a/Environment/volcanoes.xml +++ b/Environment/volcanoes.xml @@ -4,6 +4,7 @@ 0 +0.0 0 diff --git a/Nasal/local_weather/local_weather.nas b/Nasal/local_weather/local_weather.nas index 4eeb759f0..78ef16a17 100644 --- a/Nasal/local_weather/local_weather.nas +++ b/Nasal/local_weather/local_weather.nas @@ -1036,8 +1036,13 @@ flag = getprop("local-weather/effect-volumes/number-active-turb"); var wind_enhancement_factor = windspeed_current/15.0; if (wind_enhancement_factor > 1.5) {wind_enhancement_factor = 1.5;} +var volcanic_turbulence = getprop("/environment/volcanoes/turbulence"); + +var total_turbulence = base_turbulence * wind_enhancement_factor + volcanic_turbulence; +if (total_turbulence > 1.0) {total_turbulence = 1.0;} + if ((flag ==0)) - {compat_layer.setTurbulence(base_turbulence * wind_enhancement_factor);} + {compat_layer.setTurbulence(total_turbulence);} # set scattering on the ground - this doesn't affect fog but is diffuse and specular light reduction # so it is stronger than normal scattering