Fix region crossings and access to inventory after changing regions within

the same simulator
This commit is contained in:
Melanie Thielker
2008-08-19 15:09:35 +00:00
parent 5c360e7374
commit e5cdba1cb4
4 changed files with 50 additions and 7 deletions

View File

@@ -3860,5 +3860,22 @@ namespace OpenSim.Region.Environment.Scenes
client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
}
public void SetRootAgentScene(LLUUID agentID)
{
IInventoryModule inv = RequestModuleInterface<IInventoryModule>();
if(inv == null)
return;
inv.SetRootAgentScene(agentID, this);
}
public bool NeedSceneCacheClear(LLUUID agentID)
{
IInventoryModule inv = RequestModuleInterface<IInventoryModule>();
if(inv == null)
return true;
return inv.NeedSceneCacheClear(agentID, this);
}
}
}

View File

@@ -653,9 +653,10 @@ namespace OpenSim.Region.Environment.Scenes
SendCloseChildAgentConnections(avatar.UUID,avatar.GetKnownRegionList());
}
// if (teleport success) // seems to be always success here
// the user may change thier profile information in other region,
// the user may change their profile information in other region,
// so the userinfo in UserProfileCache is not reliable any more, delete it
m_commsProvider.UserProfileCacheService.RemoveUser(avatar.UUID);
if (avatar.Scene.NeedSceneCacheClear(avatar.UUID))
m_commsProvider.UserProfileCacheService.RemoveUser(avatar.UUID);
m_log.InfoFormat("User {0} is going to another region, profile cache removed", avatar.UUID);
}
else

View File

@@ -606,6 +606,8 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public void MakeRootAgent(LLVector3 pos, bool isFlying)
{
m_scene.SetRootAgentScene(m_uuid);
IAvatarFactory ava = m_scene.RequestModuleInterface<IAvatarFactory>();
if (ava != null)
{
@@ -2010,9 +2012,10 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.SendKillObject(m_localId);
m_scene.NotifyMyCoarseLocationChange();
// the user may change thier profile information in other region,
// the user may change their profile information in other region,
// so the userinfo in UserProfileCache is not reliable any more, delete it
m_scene.CommsManager.UserProfileCacheService.RemoveUser(UUID);
if(m_scene.NeedSceneCacheClear(UUID))
m_scene.CommsManager.UserProfileCacheService.RemoveUser(UUID);
m_log.InfoFormat("User {0} is going to another region, profile cache removed", UUID);
}
else