1
0
Fork 0

AW provides option to set a localized turbulence field around active volcano

This commit is contained in:
Thorsten Renk 2019-05-20 10:13:55 +03:00
parent 33e1404c51
commit f23b74904b
2 changed files with 7 additions and 1 deletions

View file

@ -4,6 +4,7 @@
<enable-volcanoes type="int" userarchive="y">0</enable-volcanoes> <enable-volcanoes type="int" userarchive="y">0</enable-volcanoes>
<turbulence type="double" userarchive="n">0.0</turbulence>
<kilauea> <kilauea>
<halemaumau-activity type="int" userarchive="y">0</halemaumau-activity> <halemaumau-activity type="int" userarchive="y">0</halemaumau-activity>

View file

@ -1036,8 +1036,13 @@ flag = getprop("local-weather/effect-volumes/number-active-turb");
var wind_enhancement_factor = windspeed_current/15.0; var wind_enhancement_factor = windspeed_current/15.0;
if (wind_enhancement_factor > 1.5) {wind_enhancement_factor = 1.5;} 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)) 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 # set scattering on the ground - this doesn't affect fog but is diffuse and specular light reduction
# so it is stronger than normal scattering # so it is stronger than normal scattering