aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/ViewerSupport
diff options
context:
space:
mode:
authorDiva Canto2014-11-11 20:42:13 -0800
committerDiva Canto2014-11-11 20:42:13 -0800
commit32293cfd6ba20cc5cab0a5acba587edea2582324 (patch)
treef22e6593deb43629b0c89cbeb941c90f8517be79 /OpenSim/Region/OptionalModules/ViewerSupport
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-32293cfd6ba20cc5cab0a5acba587edea2582324.zip
opensim-SC_OLD-32293cfd6ba20cc5cab0a5acba587edea2582324.tar.gz
opensim-SC_OLD-32293cfd6ba20cc5cab0a5acba587edea2582324.tar.bz2
opensim-SC_OLD-32293cfd6ba20cc5cab0a5acba587edea2582324.tar.xz
Fix the fetching of module references in the viewer support modules.
Remove the detachment of attachments in camera-only, because it doesn't work for HG people, and it's too drastic of a move.
Diffstat (limited to 'OpenSim/Region/OptionalModules/ViewerSupport')
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs13
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs3
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs8
3 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
index c56e029..7ae4223 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
@@ -95,8 +95,6 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
95 if (m_Enabled) 95 if (m_Enabled)
96 { 96 {
97 m_scene = scene; 97 m_scene = scene;
98 IEntityTransferModule et = m_scene.RequestModuleInterface<IEntityTransferModule>();
99 m_Helper = new SimulatorFeaturesHelper(scene, et);
100 //m_scene.EventManager.OnMakeRootAgent += (OnMakeRootAgent); 98 //m_scene.EventManager.OnMakeRootAgent += (OnMakeRootAgent);
101 } 99 }
102 } 100 }
@@ -110,9 +108,11 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
110 { 108 {
111 if (m_Enabled) 109 if (m_Enabled)
112 { 110 {
113 ISimulatorFeaturesModule featuresModule = m_scene.RequestModuleInterface<ISimulatorFeaturesModule>(); 111 IEntityTransferModule et = m_scene.RequestModuleInterface<IEntityTransferModule>();
112 m_Helper = new SimulatorFeaturesHelper(scene, et);
114 113
115 if (featuresModule != null && m_Enabled) 114 ISimulatorFeaturesModule featuresModule = m_scene.RequestModuleInterface<ISimulatorFeaturesModule>();
115 if (featuresModule != null)
116 featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest; 116 featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest;
117 } 117 }
118 } 118 }
@@ -138,7 +138,10 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
138 } 138 }
139 extrasMap["camera-only-mode"] = OSDMap.FromString("true"); 139 extrasMap["camera-only-mode"] = OSDMap.FromString("true");
140 m_log.DebugFormat("[CAMERA-ONLY MODE]: Sent in {0}", m_scene.RegionInfo.RegionName); 140 m_log.DebugFormat("[CAMERA-ONLY MODE]: Sent in {0}", m_scene.RegionInfo.RegionName);
141 Util.FireAndForget(delegate { DetachAttachments(agentID); }); 141
142 // Detaching attachments doesn't work for HG visitors,
143 // so I'm giving that up.
144 //Util.FireAndForget(delegate { DetachAttachments(agentID); });
142 } 145 }
143 else 146 else
144 m_log.DebugFormat("[CAMERA-ONLY MODE]: NOT Sending camera-only-mode in {0}", m_scene.RegionInfo.RegionName); 147 m_log.DebugFormat("[CAMERA-ONLY MODE]: NOT Sending camera-only-mode in {0}", m_scene.RegionInfo.RegionName);
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
index 1900f31..825c031 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
@@ -101,6 +101,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
101 if (client != null) 101 if (client != null)
102 { 102 {
103 ScenePresence sp = WaitGetScenePresence(agentID); 103 ScenePresence sp = WaitGetScenePresence(agentID);
104
104 if (sp == null) // Client is connected but SP still doesn't exist: this may happen on login 105 if (sp == null) // Client is connected but SP still doesn't exist: this may happen on login
105 { 106 {
106 m_log.DebugFormat("[XXX]: SP is null"); 107 m_log.DebugFormat("[XXX]: SP is null");
@@ -123,11 +124,13 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
123 rsend.send = true; 124 rsend.send = true;
124 else 125 else
125 m_log.DebugFormat("[XXX]: Child or in transit"); 126 m_log.DebugFormat("[XXX]: Child or in transit");
127
126 } 128 }
127 } 129 }
128 else 130 else
129 m_log.DebugFormat("[XXX]: client is null"); 131 m_log.DebugFormat("[XXX]: client is null");
130 132
133
131 if (rsendlist == null) 134 if (rsendlist == null)
132 { 135 {
133 rsendlist = new List<RegionSend>(); 136 rsendlist = new List<RegionSend>();
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs
index 6415c6c..0a8c83a 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/SpecialUIModule.cs
@@ -95,8 +95,6 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
95 if (m_Enabled) 95 if (m_Enabled)
96 { 96 {
97 m_scene = scene; 97 m_scene = scene;
98 IEntityTransferModule et = m_scene.RequestModuleInterface<IEntityTransferModule>();
99 m_Helper = new SimulatorFeaturesHelper(scene, et);
100 } 98 }
101 } 99 }
102 100
@@ -104,9 +102,11 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
104 { 102 {
105 if (m_Enabled) 103 if (m_Enabled)
106 { 104 {
107 ISimulatorFeaturesModule featuresModule = m_scene.RequestModuleInterface<ISimulatorFeaturesModule>(); 105 IEntityTransferModule et = m_scene.RequestModuleInterface<IEntityTransferModule>();
106 m_Helper = new SimulatorFeaturesHelper(scene, et);
108 107
109 if (featuresModule != null && m_Enabled) 108 ISimulatorFeaturesModule featuresModule = m_scene.RequestModuleInterface<ISimulatorFeaturesModule>();
109 if (featuresModule != null)
110 featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest; 110 featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest;
111 } 111 }
112 } 112 }