aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-13 21:01:10 +0100
committerJustin Clark-Casey (justincc)2010-08-13 21:01:10 +0100
commitfd23f270c6914b7aa628f96daa9608745d3a20b3 (patch)
treed57a8b817c3365392d337b6e1592b69d12bbc471
parentrefactor: move more map tile generation code from scene to IWorldMapModule (diff)
downloadopensim-SC_OLD-fd23f270c6914b7aa628f96daa9608745d3a20b3.zip
opensim-SC_OLD-fd23f270c6914b7aa628f96daa9608745d3a20b3.tar.gz
opensim-SC_OLD-fd23f270c6914b7aa628f96daa9608745d3a20b3.tar.bz2
opensim-SC_OLD-fd23f270c6914b7aa628f96daa9608745d3a20b3.tar.xz
refactor: remove Scene.SetRootAgentScene() in favour of existing event with same name
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs15
-rw-r--r--OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
4 files changed, 10 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 2f1e9dd..8b77a5f 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -82,6 +82,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
82 scene.EventManager.OnNewClient += OnNewClient; 82 scene.EventManager.OnNewClient += OnNewClient;
83 scene.EventManager.OnClientClosed += ClientLoggedOut; 83 scene.EventManager.OnClientClosed += ClientLoggedOut;
84 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 84 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
85 scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
85 } 86 }
86 87
87 public void RegionLoaded(Scene scene) 88 public void RegionLoaded(Scene scene)
@@ -98,9 +99,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
98 scene.EventManager.OnNewClient -= OnNewClient; 99 scene.EventManager.OnNewClient -= OnNewClient;
99 scene.EventManager.OnClientClosed -= ClientLoggedOut; 100 scene.EventManager.OnClientClosed -= ClientLoggedOut;
100 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; 101 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
102 scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
101 } 103 }
102 } 104 }
103
104 } 105 }
105 106
106 public void RemoveRegion(Scene scene) 107 public void RemoveRegion(Scene scene)
@@ -108,6 +109,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
108 scene.EventManager.OnNewClient -= OnNewClient; 109 scene.EventManager.OnNewClient -= OnNewClient;
109 scene.EventManager.OnClientClosed -= ClientLoggedOut; 110 scene.EventManager.OnClientClosed -= ClientLoggedOut;
110 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; 111 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
112 scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
111 m_Scenelist.Remove(scene); 113 m_Scenelist.Remove(scene);
112 } 114 }
113 115
@@ -136,6 +138,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
136 // Inventory giving is conducted via instant message 138 // Inventory giving is conducted via instant message
137 client.OnInstantMessage += OnInstantMessage; 139 client.OnInstantMessage += OnInstantMessage;
138 } 140 }
141
142 protected void OnSetRootAgentScene(UUID id, Scene scene)
143 {
144 m_AgentRegions[id] = scene;
145 }
139 146
140 private Scene FindClientScene(UUID agentId) 147 private Scene FindClientScene(UUID agentId)
141 { 148 {
@@ -160,7 +167,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
160 if (scene == null) // Something seriously wrong here. 167 if (scene == null) // Something seriously wrong here.
161 return; 168 return;
162 169
163
164 if (im.dialog == (byte) InstantMessageDialog.InventoryOffered) 170 if (im.dialog == (byte) InstantMessageDialog.InventoryOffered)
165 { 171 {
166 //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0])); 172 //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0]));
@@ -346,11 +352,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
346 } 352 }
347 } 353 }
348 354
349 public void SetRootAgentScene(UUID agentID, Scene scene)
350 {
351 m_AgentRegions[agentID] = scene;
352 }
353
354 public bool NeedSceneCacheClear(UUID agentID, Scene scene) 355 public bool NeedSceneCacheClear(UUID agentID, Scene scene)
355 { 356 {
356 if (!m_AgentRegions.ContainsKey(agentID)) 357 if (!m_AgentRegions.ContainsKey(agentID))
diff --git a/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs
index 2390ff4..1e92fde 100644
--- a/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs
@@ -35,7 +35,6 @@ namespace OpenSim.Region.Framework.Interfaces
35 /// </summary> 35 /// </summary>
36 public interface IInventoryTransferModule 36 public interface IInventoryTransferModule
37 { 37 {
38 void SetRootAgentScene(UUID agentID, Scene scene);
39 bool NeedSceneCacheClear(UUID agentID, Scene scene); 38 bool NeedSceneCacheClear(UUID agentID, Scene scene);
40 } 39 }
41} 40} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4d5c1e7..631046a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4487,17 +4487,6 @@ namespace OpenSim.Region.Framework.Scenes
4487 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); 4487 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
4488 } 4488 }
4489 4489
4490 public void SetRootAgentScene(UUID agentID)
4491 {
4492 IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>();
4493 if (inv == null)
4494 return;
4495
4496 inv.SetRootAgentScene(agentID, this);
4497
4498 EventManager.TriggerSetRootAgentScene(agentID, this);
4499 }
4500
4501 public bool NeedSceneCacheClear(UUID agentID) 4490 public bool NeedSceneCacheClear(UUID agentID)
4502 { 4491 {
4503 IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>(); 4492 IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 14d7d6a..08c6e27 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -821,7 +821,7 @@ namespace OpenSim.Region.Framework.Scenes
821 821
822 m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; 822 m_rootRegionHandle = m_scene.RegionInfo.RegionHandle;
823 823
824 m_scene.SetRootAgentScene(m_uuid); 824 m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene);
825 825
826 // Moved this from SendInitialData to ensure that m_appearance is initialized 826 // Moved this from SendInitialData to ensure that m_appearance is initialized
827 // before the inventory is processed in MakeRootAgent. This fixes a race condition 827 // before the inventory is processed in MakeRootAgent. This fixes a race condition