aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
diff options
context:
space:
mode:
authorRevolution2010-01-22 18:09:33 -0600
committerMelanie2010-01-23 15:18:52 +0000
commitec3c31e61e5e540f822891110df9bc978655bbaf (patch)
treeb0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
parentadd a target position to agent updates to ScenePresence to support alternativ... (diff)
downloadopensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs30
1 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
index 5fa3dc2..a2cfce6 100644
--- a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
+++ b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using Mono.Addins;
30using Nini.Config; 31using Nini.Config;
31using OpenMetaverse; 32using OpenMetaverse;
32using OpenSim.Framework; 33using OpenSim.Framework;
@@ -35,6 +36,7 @@ using OpenSim.Region.Framework.Scenes;
35 36
36namespace OpenSim.Region.CoreModules 37namespace OpenSim.Region.CoreModules
37{ 38{
39 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
38 public class CloudModule : ICloudModule 40 public class CloudModule : ICloudModule
39 { 41 {
40// private static readonly log4net.ILog m_log 42// private static readonly log4net.ILog m_log
@@ -48,7 +50,7 @@ namespace OpenSim.Region.CoreModules
48 private float m_cloudDensity = 1.0F; 50 private float m_cloudDensity = 1.0F;
49 private float[] cloudCover = new float[16 * 16]; 51 private float[] cloudCover = new float[16 * 16];
50 52
51 public void Initialise(Scene scene, IConfigSource config) 53 public void Initialise(IConfigSource config)
52 { 54 {
53 IConfig cloudConfig = config.Configs["Cloud"]; 55 IConfig cloudConfig = config.Configs["Cloud"];
54 56
@@ -58,10 +60,17 @@ namespace OpenSim.Region.CoreModules
58 m_cloudDensity = cloudConfig.GetFloat("density", 0.5F); 60 m_cloudDensity = cloudConfig.GetFloat("density", 0.5F);
59 m_frameUpdateRate = cloudConfig.GetInt("cloud_update_rate", 1000); 61 m_frameUpdateRate = cloudConfig.GetInt("cloud_update_rate", 1000);
60 } 62 }
63 }
64
65 public Type ReplaceableInterface
66 {
67 get { return null; }
68 }
61 69
70 public void AddRegion(Scene scene)
71 {
62 if (m_enabled) 72 if (m_enabled)
63 { 73 {
64
65 m_scene = scene; 74 m_scene = scene;
66 75
67 scene.EventManager.OnNewClient += CloudsToClient; 76 scene.EventManager.OnNewClient += CloudsToClient;
@@ -71,9 +80,18 @@ namespace OpenSim.Region.CoreModules
71 GenerateCloudCover(); 80 GenerateCloudCover();
72 81
73 m_ready = true; 82 m_ready = true;
74
75 } 83 }
84 }
76 85
86 public void RegionLoaded(Scene scene)
87 {
88 }
89
90 public void RemoveRegion(Scene scene)
91 {
92 scene.EventManager.OnNewClient -= CloudsToClient;
93 scene.UnregisterModuleInterface<ICloudModule>(this);
94 scene.EventManager.OnFrame -= CloudUpdate;
77 } 95 }
78 96
79 public void PostInitialise() 97 public void PostInitialise()
@@ -96,12 +114,6 @@ namespace OpenSim.Region.CoreModules
96 get { return "CloudModule"; } 114 get { return "CloudModule"; }
97 } 115 }
98 116
99 public bool IsSharedModule
100 {
101 get { return false; }
102 }
103
104
105 public float CloudCover(int x, int y, int z) 117 public float CloudCover(int x, int y, int z)
106 { 118 {
107 float cover = 0f; 119 float cover = 0f;