diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs index fcb0c10..d2ff7b3 100644 --- a/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs +++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/SimpleRandomWind.cs | |||
@@ -82,22 +82,23 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins | |||
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | public void WindUpdate(uint frame) | 85 | public bool WindUpdate(uint frame) |
86 | { | 86 | { |
87 | //Make sure our object is valid (we haven't been disposed of yet) | 87 | //Make sure our object is valid (we haven't been disposed of yet) |
88 | if (m_windSpeeds != null) | 88 | if (m_windSpeeds == null) |
89 | return false; | ||
90 | |||
91 | for (int y = 0; y < 16; y++) | ||
89 | { | 92 | { |
90 | for (int y = 0; y < 16; y++) | 93 | for (int x = 0; x < 16; x++) |
91 | { | 94 | { |
92 | for (int x = 0; x < 16; x++) | 95 | m_windSpeeds[y * 16 + x].X = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1 |
93 | { | 96 | m_windSpeeds[y * 16 + x].Y = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1 |
94 | m_windSpeeds[y * 16 + x].X = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1 | 97 | m_windSpeeds[y * 16 + x].X *= m_strength; |
95 | m_windSpeeds[y * 16 + x].Y = (float)(m_rndnums.NextDouble() * 2d - 1d); // -1 to 1 | 98 | m_windSpeeds[y * 16 + x].Y *= m_strength; |
96 | m_windSpeeds[y * 16 + x].X *= m_strength; | ||
97 | m_windSpeeds[y * 16 + x].Y *= m_strength; | ||
98 | } | ||
99 | } | 99 | } |
100 | } | 100 | } |
101 | return true; | ||
101 | } | 102 | } |
102 | 103 | ||
103 | public Vector3 WindSpeed(float fX, float fY, float fZ) | 104 | public Vector3 WindSpeed(float fX, float fY, float fZ) |