aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-18 07:27:39 +0000
committerMelanie Thielker2008-10-18 07:27:39 +0000
commit264eeffd0294d27fd1329a27c84c8b61e5fb0993 (patch)
treeecdf24a2ac2e94ff4606b015573ab24930e847a1 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentMegapatch. :) Fix skull attachment editing. Streamline Object terse updates. (diff)
downloadopensim-SC-264eeffd0294d27fd1329a27c84c8b61e5fb0993.zip
opensim-SC-264eeffd0294d27fd1329a27c84c8b61e5fb0993.tar.gz
opensim-SC-264eeffd0294d27fd1329a27c84c8b61e5fb0993.tar.bz2
opensim-SC-264eeffd0294d27fd1329a27c84c8b61e5fb0993.tar.xz
Fix thingd so that autoreturn also works when the user is not in the sim.
Also add experimental distance ordering for prims
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs27
1 files changed, 19 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index b91eb83..733392f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1618,19 +1618,17 @@ namespace OpenSim.Region.Environment.Scenes
1618 { 1618 {
1619 string sceneObjectXml = objectGroup.ToXmlString(); 1619 string sceneObjectXml = objectGroup.ToXmlString();
1620 1620
1621 CachedUserInfo userInfo = 1621 CachedUserInfo userInfo;
1622 CommsManager.UserProfileCacheService.GetUserDetails(
1623 remoteClient.AgentId);
1624 1622
1625 if (remoteClient == null) 1623 if (remoteClient == null)
1626 { 1624 {
1627 userInfo = CommsManager.UserProfileCacheService.GetUserDetails( 1625 userInfo = CommsManager.UserProfileCacheService.GetUserDetails(
1628 objectGroup.RootPart.OwnerID); 1626 objectGroup.RootPart.OwnerID);
1629 } 1627 }
1630 else 1628 else
1631 { 1629 {
1632 userInfo = CommsManager.UserProfileCacheService.GetUserDetails( 1630 userInfo = CommsManager.UserProfileCacheService.GetUserDetails(
1633 remoteClient.AgentId); 1631 remoteClient.AgentId);
1634 } 1632 }
1635 1633
1636 if (userInfo != null) 1634 if (userInfo != null)
@@ -1648,9 +1646,22 @@ namespace OpenSim.Region.Environment.Scenes
1648 (int)AssetType.LostAndFoundFolder); 1646 (int)AssetType.LostAndFoundFolder);
1649 1647
1650 if (folder != null) 1648 if (folder != null)
1649 {
1651 folderID = folder.ID; 1650 folderID = folder.ID;
1651 }
1652 else 1652 else
1653 folderID = userInfo.RootFolder.ID; 1653 {
1654 if (userInfo.RootFolder != null)
1655 {
1656 folderID = userInfo.RootFolder.ID;
1657 }
1658 else
1659 {
1660 CommsManager.UserProfileCacheService.RequestInventoryForUser(objectGroup.RootPart.OwnerID);
1661 m_log.WarnFormat("[SCENE] Can't find root folder for user, requesting inventory");
1662 return;
1663 }
1664 }
1654 } 1665 }
1655 1666
1656 AssetBase asset = CreateAsset( 1667 AssetBase asset = CreateAsset(
@@ -1677,7 +1688,7 @@ namespace OpenSim.Region.Environment.Scenes
1677 item.InvType = (int)InventoryType.Object; 1688 item.InvType = (int)InventoryType.Object;
1678 item.Folder = folderID; 1689 item.Folder = folderID;
1679 1690
1680 if ((remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) 1691 if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
1681 { 1692 {
1682 uint perms=objectGroup.GetEffectivePermissions(); 1693 uint perms=objectGroup.GetEffectivePermissions();
1683 uint nextPerms=(perms & 7) << 13; 1694 uint nextPerms=(perms & 7) << 13;
@@ -1706,7 +1717,7 @@ namespace OpenSim.Region.Environment.Scenes
1706 item.CreationDate = Util.UnixTimeSinceEpoch(); 1717 item.CreationDate = Util.UnixTimeSinceEpoch();
1707 1718
1708 userInfo.AddItem(item); 1719 userInfo.AddItem(item);
1709 if (item.Owner == remoteClient.AgentId) 1720 if (remoteClient != null && item.Owner == remoteClient.AgentId)
1710 { 1721 {
1711 remoteClient.SendInventoryItemCreateUpdate(item); 1722 remoteClient.SendInventoryItemCreateUpdate(item);
1712 } 1723 }