1
0
Fork 0

Local weather: setprop() passed a NaN in local_weather/weather_tiles.nas, line 2795

Tiecket: #2423
This commit is contained in:
Scott Giese 2020-11-21 02:12:02 -06:00
parent f125b75429
commit c874567679

View file

@ -2779,15 +2779,15 @@ var set_METAR_weather_station = func {
# also compute and set gust wind info
var gust_angvar = 0.5 * weather_tile_management.relangle(wind_range_from, wind_range_to);
var gust_relative_strength = 0.0;
if ((gust_strength > 0.0) or (gust_angvar > 0.0))
{
var gust_relative_strength = (gust_strength - windspeed)/windspeed;
gust_relative_strength = (gust_strength - windspeed)/windspeed;
setprop(lw~"tmp/gust-frequency-hz", 0.2 + rand()*0.8);
}
else
{
var gust_relative_strength = 0.0;
setprop(lw~"tmp/gust-frequency-hz", 0.0);
}