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