aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/RegionCombinerModule
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule')
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs24
1 files changed, 18 insertions, 6 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
index 9d41c9c..a0d6197 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
@@ -28,11 +28,14 @@
28using System; 28using System;
29using OpenMetaverse; 29using OpenMetaverse;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.CoreModules.Avatar.Attachments;
32using OpenSim.Region.CoreModules.Avatar.Gods;
33using OpenSim.Region.Framework.Interfaces;
31using OpenSim.Region.Framework.Scenes; 34using OpenSim.Region.Framework.Scenes;
32 35
33namespace OpenSim.Region.RegionCombinerModule 36namespace OpenSim.Region.RegionCombinerModule
34{ 37{
35 public class RegionCombinerIndividualEventForwarder 38 public class RegionCombinerIndividualEventForwarder
36 { 39 {
37 private Scene m_rootScene; 40 private Scene m_rootScene;
38 private Scene m_virtScene; 41 private Scene m_virtScene;
@@ -46,22 +49,31 @@ namespace OpenSim.Region.RegionCombinerModule
46 public void ClientConnect(IClientAPI client) 49 public void ClientConnect(IClientAPI client)
47 { 50 {
48 m_virtScene.UnSubscribeToClientPrimEvents(client); 51 m_virtScene.UnSubscribeToClientPrimEvents(client);
49 m_virtScene.UnSubscribeToClientPrimRezEvents(client); 52 m_virtScene.UnSubscribeToClientPrimRezEvents(client);
50 m_virtScene.UnSubscribeToClientInventoryEvents(client); 53 m_virtScene.UnSubscribeToClientInventoryEvents(client);
51 m_virtScene.UnSubscribeToClientAttachmentEvents(client); 54 ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client);
52 //m_virtScene.UnSubscribeToClientTeleportEvents(client); 55 //m_virtScene.UnSubscribeToClientTeleportEvents(client);
53 m_virtScene.UnSubscribeToClientScriptEvents(client); 56 m_virtScene.UnSubscribeToClientScriptEvents(client);
54 m_virtScene.UnSubscribeToClientGodEvents(client); 57
58 IGodsModule virtGodsModule = m_virtScene.RequestModuleInterface<IGodsModule>();
59 if (virtGodsModule != null)
60 ((GodsModule)virtGodsModule).UnsubscribeFromClientEvents(client);
61
55 m_virtScene.UnSubscribeToClientNetworkEvents(client); 62 m_virtScene.UnSubscribeToClientNetworkEvents(client);
56 63
57 m_rootScene.SubscribeToClientPrimEvents(client); 64 m_rootScene.SubscribeToClientPrimEvents(client);
58 client.OnAddPrim += LocalAddNewPrim; 65 client.OnAddPrim += LocalAddNewPrim;
59 client.OnRezObject += LocalRezObject; 66 client.OnRezObject += LocalRezObject;
67
60 m_rootScene.SubscribeToClientInventoryEvents(client); 68 m_rootScene.SubscribeToClientInventoryEvents(client);
61 m_rootScene.SubscribeToClientAttachmentEvents(client); 69 ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client);
62 //m_rootScene.SubscribeToClientTeleportEvents(client); 70 //m_rootScene.SubscribeToClientTeleportEvents(client);
63 m_rootScene.SubscribeToClientScriptEvents(client); 71 m_rootScene.SubscribeToClientScriptEvents(client);
64 m_rootScene.SubscribeToClientGodEvents(client); 72
73 IGodsModule rootGodsModule = m_virtScene.RequestModuleInterface<IGodsModule>();
74 if (rootGodsModule != null)
75 ((GodsModule)rootGodsModule).UnsubscribeFromClientEvents(client);
76
65 m_rootScene.SubscribeToClientNetworkEvents(client); 77 m_rootScene.SubscribeToClientNetworkEvents(client);
66 } 78 }
67 79