diff options
author | idb | 2009-04-11 10:18:20 +0000 |
---|---|---|
committer | idb | 2009-04-11 10:18:20 +0000 |
commit | 988737b182a59bc0bca72b3c302ab68dd9c5ccfb (patch) | |
tree | 481d5527ab3a81dbc0c5df1cea6b27bae52a583b | |
parent | * BulletDotNETPlugin supports Axis lock (LLSetStatus) from the script engine ... (diff) | |
download | opensim-SC_OLD-988737b182a59bc0bca72b3c302ab68dd9c5ccfb.zip opensim-SC_OLD-988737b182a59bc0bca72b3c302ab68dd9c5ccfb.tar.gz opensim-SC_OLD-988737b182a59bc0bca72b3c302ab68dd9c5ccfb.tar.bz2 opensim-SC_OLD-988737b182a59bc0bca72b3c302ab68dd9c5ccfb.tar.xz |
Correct Opensim.ini.example to reflect the default settings for clouds.
Fixes Mantis #3421
Change the agent/avatar events subscriptions to just OnNewClient. The data only needs to be sent once and keeping track of log ins/movements is not required. This will also send cloud data to child agents so that they can see clouds above neighbouring regions not just regions that they have visited.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs | 51 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 4 |
2 files changed, 4 insertions, 51 deletions
diff --git a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs index b9c716f..ca25a23 100644 --- a/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs +++ b/OpenSim/Region/CoreModules/World/Cloud/CloudModule.cs | |||
@@ -48,8 +48,6 @@ namespace OpenSim.Region.CoreModules | |||
48 | private float m_cloudDensity = 1.0F; | 48 | private float m_cloudDensity = 1.0F; |
49 | private float[] cloudCover = new float[16 * 16]; | 49 | private float[] cloudCover = new float[16 * 16]; |
50 | 50 | ||
51 | private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>(); | ||
52 | |||
53 | public void Initialise(Scene scene, IConfigSource config) | 51 | public void Initialise(Scene scene, IConfigSource config) |
54 | { | 52 | { |
55 | IConfig cloudConfig = config.Configs["Cloud"]; | 53 | IConfig cloudConfig = config.Configs["Cloud"]; |
@@ -66,9 +64,7 @@ namespace OpenSim.Region.CoreModules | |||
66 | 64 | ||
67 | m_scene = scene; | 65 | m_scene = scene; |
68 | 66 | ||
69 | scene.EventManager.OnMakeChildAgent += MakeChildAgent; | 67 | scene.EventManager.OnNewClient += CloudsToClient; |
70 | scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; | ||
71 | scene.EventManager.OnClientClosed += ClientLoggedOut; | ||
72 | scene.RegisterModuleInterface<ICloudModule>(this); | 68 | scene.RegisterModuleInterface<ICloudModule>(this); |
73 | scene.EventManager.OnFrame += CloudUpdate; | 69 | scene.EventManager.OnFrame += CloudUpdate; |
74 | 70 | ||
@@ -90,9 +86,7 @@ namespace OpenSim.Region.CoreModules | |||
90 | { | 86 | { |
91 | m_ready = false; | 87 | m_ready = false; |
92 | // Remove our hooks | 88 | // Remove our hooks |
93 | m_scene.EventManager.OnMakeChildAgent -= MakeChildAgent; | 89 | m_scene.EventManager.OnNewClient -= CloudsToClient; |
94 | m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; | ||
95 | m_scene.EventManager.OnClientClosed -= ClientLoggedOut; | ||
96 | m_scene.EventManager.OnFrame -= CloudUpdate; | 90 | m_scene.EventManager.OnFrame -= CloudUpdate; |
97 | } | 91 | } |
98 | } | 92 | } |
@@ -215,46 +209,5 @@ namespace OpenSim.Region.CoreModules | |||
215 | } | 209 | } |
216 | } | 210 | } |
217 | } | 211 | } |
218 | |||
219 | private void ClientLoggedOut(UUID AgentId) | ||
220 | { | ||
221 | lock (m_rootAgents) | ||
222 | { | ||
223 | if (m_rootAgents.ContainsKey(AgentId)) | ||
224 | { | ||
225 | m_rootAgents.Remove(AgentId); | ||
226 | } | ||
227 | } | ||
228 | } | ||
229 | |||
230 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) | ||
231 | { | ||
232 | lock (m_rootAgents) | ||
233 | { | ||
234 | if (m_rootAgents.ContainsKey(avatar.UUID)) | ||
235 | { | ||
236 | m_rootAgents[avatar.UUID] = avatar.RegionHandle; | ||
237 | } | ||
238 | else | ||
239 | { | ||
240 | m_rootAgents.Add(avatar.UUID, avatar.RegionHandle); | ||
241 | CloudsToClient(avatar.ControllingClient); | ||
242 | } | ||
243 | } | ||
244 | } | ||
245 | |||
246 | private void MakeChildAgent(ScenePresence avatar) | ||
247 | { | ||
248 | lock (m_rootAgents) | ||
249 | { | ||
250 | if (m_rootAgents.ContainsKey(avatar.UUID)) | ||
251 | { | ||
252 | if (m_rootAgents[avatar.UUID] == avatar.RegionHandle) | ||
253 | { | ||
254 | m_rootAgents.Remove(avatar.UUID); | ||
255 | } | ||
256 | } | ||
257 | } | ||
258 | } | ||
259 | } | 212 | } |
260 | } | 213 | } |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 2826462..ee2cfd6 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -752,9 +752,9 @@ | |||
752 | [Cloud] | 752 | [Cloud] |
753 | ; Enable this to generate classic particle clouds above the sim. | 753 | ; Enable this to generate classic particle clouds above the sim. |
754 | ; default is disabled - turn it on here | 754 | ; default is disabled - turn it on here |
755 | enabled = true | 755 | enabled = false |
756 | 756 | ||
757 | ; Density of cloud cover 0.0 to 1.0 | 757 | ; Density of cloud cover 0.0 to 1.0 Defult 0.5 |
758 | density = 0.5 | 758 | density = 0.5 |
759 | 759 | ||
760 | ; update interval for the cloud cover data returned by llCloud(). | 760 | ; update interval for the cloud cover data returned by llCloud(). |