diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Wind')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Wind/WindModule.cs | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs index 65691fe..a2b44df 100644 --- a/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs +++ b/OpenSim/Region/CoreModules/World/Wind/Plugins/ConfigurableWind.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins | |||
50 | private float m_avgDirection = 0.0f; // Average direction of the wind in degrees | 50 | private float m_avgDirection = 0.0f; // Average direction of the wind in degrees |
51 | private float m_varStrength = 5.0f; // Max Strength Variance | 51 | private float m_varStrength = 5.0f; // Max Strength Variance |
52 | private float m_varDirection = 30.0f;// Max Direction Variance | 52 | private float m_varDirection = 30.0f;// Max Direction Variance |
53 | private float m_rateChange = 1.0f; // | 53 | private float m_rateChange = 1.0f; // |
54 | 54 | ||
55 | private Vector2 m_curPredominateWind = new Vector2(); | 55 | private Vector2 m_curPredominateWind = new Vector2(); |
56 | 56 | ||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins | |||
70 | 70 | ||
71 | public void Initialise() | 71 | public void Initialise() |
72 | { | 72 | { |
73 | 73 | ||
74 | } | 74 | } |
75 | 75 | ||
76 | #endregion | 76 | #endregion |
@@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins | |||
111 | // Prevailing wind algorithm | 111 | // Prevailing wind algorithm |
112 | // Inspired by Kanker Greenacre | 112 | // Inspired by Kanker Greenacre |
113 | 113 | ||
114 | // TODO: | 114 | // TODO: |
115 | // * This should probably be based on in-world time. | 115 | // * This should probably be based on in-world time. |
116 | // * should probably move all these local variables to class members and constants | 116 | // * should probably move all these local variables to class members and constants |
117 | double time = DateTime.Now.TimeOfDay.Seconds / 86400.0f; | 117 | double time = DateTime.Now.TimeOfDay.Seconds / 86400.0f; |
@@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins | |||
125 | offset = Math.Sin(theta) * Math.Sin(theta*4) + (Math.Sin(theta*13) / 3); | 125 | offset = Math.Sin(theta) * Math.Sin(theta*4) + (Math.Sin(theta*13) / 3); |
126 | double windSpeed = m_avgStrength + (m_varStrength * offset); | 126 | double windSpeed = m_avgStrength + (m_varStrength * offset); |
127 | 127 | ||
128 | if (windSpeed < 0) | 128 | if (windSpeed < 0) |
129 | windSpeed = -windSpeed; | 129 | windSpeed = -windSpeed; |
130 | 130 | ||
131 | m_curPredominateWind.X = (float)Math.Cos(windDir); | 131 | m_curPredominateWind.X = (float)Math.Cos(windDir); |
@@ -157,9 +157,9 @@ namespace OpenSim.Region.CoreModules.World.Wind.Plugins | |||
157 | 157 | ||
158 | public string Description | 158 | public string Description |
159 | { | 159 | { |
160 | get | 160 | get |
161 | { | 161 | { |
162 | return "Provides a predominate wind direction that can change within configured variances for direction and speed."; | 162 | return "Provides a predominate wind direction that can change within configured variances for direction and speed."; |
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 95cf57d..a1fff62 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Region.CoreModules | |||
155 | // Register event handlers for when Avatars enter the region, and frame ticks | 155 | // Register event handlers for when Avatars enter the region, and frame ticks |
156 | m_scene.EventManager.OnFrame += WindUpdate; | 156 | m_scene.EventManager.OnFrame += WindUpdate; |
157 | 157 | ||
158 | // Register the wind module | 158 | // Register the wind module |
159 | m_scene.RegisterModuleInterface<IWindModule>(this); | 159 | m_scene.RegisterModuleInterface<IWindModule>(this); |
160 | 160 | ||
161 | // Generate initial wind values | 161 | // Generate initial wind values |
@@ -351,7 +351,7 @@ namespace OpenSim.Region.CoreModules | |||
351 | #region IWindModule Methods | 351 | #region IWindModule Methods |
352 | 352 | ||
353 | /// <summary> | 353 | /// <summary> |
354 | /// Retrieve the wind speed at the given region coordinate. This | 354 | /// Retrieve the wind speed at the given region coordinate. This |
355 | /// implimentation ignores Z. | 355 | /// implimentation ignores Z. |
356 | /// </summary> | 356 | /// </summary> |
357 | /// <param name="x">0...255</param> | 357 | /// <param name="x">0...255</param> |
@@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules | |||
396 | 396 | ||
397 | public string WindActiveModelPluginName | 397 | public string WindActiveModelPluginName |
398 | { | 398 | { |
399 | get | 399 | get |
400 | { | 400 | { |
401 | if (m_activeWindPlugin != null) | 401 | if (m_activeWindPlugin != null) |
402 | { | 402 | { |
@@ -429,7 +429,7 @@ namespace OpenSim.Region.CoreModules | |||
429 | { | 429 | { |
430 | client.SendWindData(m_dataVersion, windSpeeds); | 430 | client.SendWindData(m_dataVersion, windSpeeds); |
431 | }); | 431 | }); |
432 | 432 | ||
433 | } | 433 | } |
434 | finally | 434 | finally |
435 | { | 435 | { |
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules | |||
440 | } | 440 | } |
441 | 441 | ||
442 | /// <summary> | 442 | /// <summary> |
443 | /// Calculate new wind | 443 | /// Calculate new wind |
444 | /// returns false if no change | 444 | /// returns false if no change |
445 | /// </summary> | 445 | /// </summary> |
446 | 446 | ||