aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-19 15:09:35 +0000
committerMelanie Thielker2008-08-19 15:09:35 +0000
commite5cdba1cb49346308fb0e9699c3a6386b487d97b (patch)
treecc299b3bae3d221887522294bfe031985db93740 /OpenSim/Region/Environment/Scenes
parentUpdate svn properties, minor formatting cleanup. (diff)
downloadopensim-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/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs7
3 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 4564cf1..7d55f7e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -3860,5 +3860,22 @@ namespace OpenSim.Region.Environment.Scenes
3860 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); 3860 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
3861 } 3861 }
3862 3862
3863 public void SetRootAgentScene(LLUUID agentID)
3864 {
3865 IInventoryModule inv = RequestModuleInterface<IInventoryModule>();
3866 if(inv == null)
3867 return;
3868
3869 inv.SetRootAgentScene(agentID, this);
3870 }
3871
3872 public bool NeedSceneCacheClear(LLUUID agentID)
3873 {
3874 IInventoryModule inv = RequestModuleInterface<IInventoryModule>();
3875 if(inv == null)
3876 return true;
3877
3878 return inv.NeedSceneCacheClear(agentID, this);
3879 }
3863 } 3880 }
3864} 3881}
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index adad7d3..f1af15f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -653,9 +653,10 @@ namespace OpenSim.Region.Environment.Scenes
653 SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList()); 653 SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList());
654 } 654 }
655 // if (teleport success) // seems to be always success here 655 // if (teleport success) // seems to be always success here
656 // the user may change thier profile information in other region, 656 // the user may change their profile information in other region,
657 // so the userinfo in UserProfileCache is not reliable any more, delete it 657 // so the userinfo in UserProfileCache is not reliable any more, delete it
658 m_commsProvider.UserProfileCacheService.RemoveUser(avatar.UUID); 658 if (avatar.Scene.NeedSceneCacheClear(avatar.UUID))
659 m_commsProvider.UserProfileCacheService.RemoveUser(avatar.UUID);
659 m_log.InfoFormat("User {0} is going to another region, profile cache removed", avatar.UUID); 660 m_log.InfoFormat("User {0} is going to another region, profile cache removed", avatar.UUID);
660 } 661 }
661 else 662 else
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 8059a78..706fd61 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -606,6 +606,8 @@ namespace OpenSim.Region.Environment.Scenes
606 /// </summary> 606 /// </summary>
607 public void MakeRootAgent(LLVector3 pos, bool isFlying) 607 public void MakeRootAgent(LLVector3 pos, bool isFlying)
608 { 608 {
609 m_scene.SetRootAgentScene(m_uuid);
610
609 IAvatarFactory ava = m_scene.RequestModuleInterface<IAvatarFactory>(); 611 IAvatarFactory ava = m_scene.RequestModuleInterface<IAvatarFactory>();
610 if (ava != null) 612 if (ava != null)
611 { 613 {
@@ -2010,9 +2012,10 @@ namespace OpenSim.Region.Environment.Scenes
2010 2012
2011 m_scene.SendKillObject(m_localId); 2013 m_scene.SendKillObject(m_localId);
2012 m_scene.NotifyMyCoarseLocationChange(); 2014 m_scene.NotifyMyCoarseLocationChange();
2013 // the user may change thier profile information in other region, 2015 // the user may change their profile information in other region,
2014 // so the userinfo in UserProfileCache is not reliable any more, delete it 2016 // so the userinfo in UserProfileCache is not reliable any more, delete it
2015 m_scene.CommsManager.UserProfileCacheService.RemoveUser(UUID); 2017 if(m_scene.NeedSceneCacheClear(UUID))
2018 m_scene.CommsManager.UserProfileCacheService.RemoveUser(UUID);
2016 m_log.InfoFormat("User {0} is going to another region, profile cache removed", UUID); 2019 m_log.InfoFormat("User {0} is going to another region, profile cache removed", UUID);
2017 } 2020 }
2018 else 2021 else