aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS.txt1
-rw-r--r--OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs16
2 files changed, 11 insertions, 6 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 0217476..8b0a616 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -60,6 +60,7 @@ Patches
60* Grumly57 60* Grumly57
61* Fly-Man 61* Fly-Man
62* Flyte Xevious 62* Flyte Xevious
63* Intimidated
63* jhurliman 64* jhurliman
64* jimbo2120 (IBM) 65* jimbo2120 (IBM)
65* John R Sohn (XenReborn) 66* John R Sohn (XenReborn)
diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs
index cdd5a2e..2c371da 100644
--- a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs
+++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs
@@ -82,14 +82,18 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins
82 82
83 public void WindUpdate(uint frame) 83 public void WindUpdate(uint frame)
84 { 84 {
85 for (int y = 0; y < 16; y++) 85 //Make sure our object is valid (we haven't been disposed of yet)
86 if (m_windSpeeds != null)
86 { 87 {
87 for (int x = 0; x < 16; x++) 88 for (int y = 0; y < 16; y++)
88 { 89 {
89 m_windSpeeds[y * 16 + x].X = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1 90 for (int x = 0; x < 16; x++)
90 m_windSpeeds[y * 16 + x].Y = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1 91 {
91 m_windSpeeds[y * 16 + x].X *= m_strength; 92 m_windSpeeds[y * 16 + x].X = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1
92 m_windSpeeds[y * 16 + x].Y *= m_strength; 93 m_windSpeeds[y * 16 + x].Y = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1
94 m_windSpeeds[y * 16 + x].X *= m_strength;
95 m_windSpeeds[y * 16 + x].Y *= m_strength;
96 }
93 } 97 }
94 } 98 }
95 } 99 }