diff options
author | Melanie Thielker | 2008-08-19 15:09:35 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-19 15:09:35 +0000 |
commit | e5cdba1cb49346308fb0e9699c3a6386b487d97b (patch) | |
tree | cc299b3bae3d221887522294bfe031985db93740 /OpenSim/Region/Environment/Modules | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC_OLD-e5cdba1cb49346308fb0e9699c3a6386b487d97b.zip opensim-SC_OLD-e5cdba1cb49346308fb0e9699c3a6386b487d97b.tar.gz opensim-SC_OLD-e5cdba1cb49346308fb0e9699c3a6386b487d97b.tar.bz2 opensim-SC_OLD-e5cdba1cb49346308fb0e9699c3a6386b487d97b.tar.xz |
Fix region crossings and access to inventory after changing regions within
the same simulator
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs index 03bbaf3..5f0d83d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs | |||
@@ -49,6 +49,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
49 | private IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>(); | 49 | private IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>(); |
50 | 50 | ||
51 | private List<Scene> m_Scenelist = new List<Scene>(); | 51 | private List<Scene> m_Scenelist = new List<Scene>(); |
52 | private Dictionary<LLUUID, Scene> m_AgentRegions = new Dictionary<LLUUID, Scene>(); | ||
52 | 53 | ||
53 | #region IRegionModule Members | 54 | #region IRegionModule Members |
54 | 55 | ||
@@ -61,6 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
61 | scene.RegisterModuleInterface<IInventoryModule>(this); | 62 | scene.RegisterModuleInterface<IInventoryModule>(this); |
62 | 63 | ||
63 | scene.EventManager.OnNewClient += OnNewClient; | 64 | scene.EventManager.OnNewClient += OnNewClient; |
65 | scene.EventManager.OnClientClosed += ClientLoggedOut; | ||
64 | } | 66 | } |
65 | } | 67 | } |
66 | 68 | ||
@@ -223,8 +225,28 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
223 | } | 225 | } |
224 | } | 226 | } |
225 | 227 | ||
226 | // public void TestFunction() | 228 | public void SetRootAgentScene(LLUUID agentID, Scene scene) |
227 | // { | 229 | { |
228 | // } | 230 | m_AgentRegions[agentID] = scene; |
231 | } | ||
232 | |||
233 | public bool NeedSceneCacheClear(LLUUID agentID, Scene scene) | ||
234 | { | ||
235 | if (!m_AgentRegions.ContainsKey(agentID)) | ||
236 | return true; | ||
237 | |||
238 | if(m_AgentRegions[agentID] == scene) | ||
239 | { | ||
240 | m_AgentRegions.Remove(agentID); | ||
241 | return true; | ||
242 | } | ||
243 | return false; | ||
244 | } | ||
245 | |||
246 | public void ClientLoggedOut(LLUUID agentID) | ||
247 | { | ||
248 | if (m_AgentRegions.ContainsKey(agentID)) | ||
249 | m_AgentRegions.Remove(agentID); | ||
250 | } | ||
229 | } | 251 | } |
230 | } | 252 | } |