Fix thingd so that autoreturn also works when the user is not in the sim.
Also add experimental distance ordering for prims0.6.0-stable
parent
efe3f3eb2a
commit
264eeffd02
|
@ -1618,9 +1618,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
string sceneObjectXml = objectGroup.ToXmlString();
|
string sceneObjectXml = objectGroup.ToXmlString();
|
||||||
|
|
||||||
CachedUserInfo userInfo =
|
CachedUserInfo userInfo;
|
||||||
CommsManager.UserProfileCacheService.GetUserDetails(
|
|
||||||
remoteClient.AgentId);
|
|
||||||
|
|
||||||
if (remoteClient == null)
|
if (remoteClient == null)
|
||||||
{
|
{
|
||||||
|
@ -1648,10 +1646,23 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
(int)AssetType.LostAndFoundFolder);
|
(int)AssetType.LostAndFoundFolder);
|
||||||
|
|
||||||
if (folder != null)
|
if (folder != null)
|
||||||
|
{
|
||||||
folderID = folder.ID;
|
folderID = folder.ID;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (userInfo.RootFolder != null)
|
||||||
|
{
|
||||||
folderID = userInfo.RootFolder.ID;
|
folderID = userInfo.RootFolder.ID;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CommsManager.UserProfileCacheService.RequestInventoryForUser(objectGroup.RootPart.OwnerID);
|
||||||
|
m_log.WarnFormat("[SCENE] Can't find root folder for user, requesting inventory");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AssetBase asset = CreateAsset(
|
AssetBase asset = CreateAsset(
|
||||||
objectGroup.GetPartName(objectGroup.RootPart.LocalId),
|
objectGroup.GetPartName(objectGroup.RootPart.LocalId),
|
||||||
|
@ -1677,7 +1688,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.InvType = (int)InventoryType.Object;
|
item.InvType = (int)InventoryType.Object;
|
||||||
item.Folder = folderID;
|
item.Folder = folderID;
|
||||||
|
|
||||||
if ((remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
|
if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
|
||||||
{
|
{
|
||||||
uint perms=objectGroup.GetEffectivePermissions();
|
uint perms=objectGroup.GetEffectivePermissions();
|
||||||
uint nextPerms=(perms & 7) << 13;
|
uint nextPerms=(perms & 7) << 13;
|
||||||
|
@ -1706,7 +1717,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||||
|
|
||||||
userInfo.AddItem(item);
|
userInfo.AddItem(item);
|
||||||
if (item.Owner == remoteClient.AgentId)
|
if (remoteClient != null && item.Owner == remoteClient.AgentId)
|
||||||
{
|
{
|
||||||
remoteClient.SendInventoryItemCreateUpdate(item);
|
remoteClient.SendInventoryItemCreateUpdate(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3385,6 +3385,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// User needs to be logged into this sim
|
// User needs to be logged into this sim
|
||||||
if (m_scenePresences.ContainsKey(agentID))
|
if (m_scenePresences.ContainsKey(agentID))
|
||||||
{
|
{
|
||||||
|
if (godLike == false)
|
||||||
|
{
|
||||||
|
m_scenePresences[agentID].GrantGodlikePowers(agentID, sessionID, token, godLike);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// First check that this is the sim owner
|
// First check that this is the sim owner
|
||||||
if (ExternalChecks.ExternalChecksCanBeGodLike(agentID))
|
if (ExternalChecks.ExternalChecksCanBeGodLike(agentID))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// that they don't happen, otherwise the deleted objects will reappear
|
// that they don't happen, otherwise the deleted objects will reappear
|
||||||
m_isDeleted = true;
|
m_isDeleted = true;
|
||||||
|
|
||||||
DetachFromBackup();
|
// DetachFromBackup();
|
||||||
|
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
{
|
{
|
||||||
|
|
|
@ -580,7 +580,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
m_pendingObjects = new Queue<SceneObjectGroup>();
|
m_pendingObjects = new Queue<SceneObjectGroup>();
|
||||||
|
|
||||||
foreach (EntityBase e in m_scene.Entities.Values)
|
List<EntityBase> ents = new List<EntityBase>(m_scene.Entities.Values);
|
||||||
|
ents.Sort(delegate(EntityBase a, EntityBase b)
|
||||||
|
{
|
||||||
|
return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition));
|
||||||
|
});
|
||||||
|
|
||||||
|
foreach (EntityBase e in ents)
|
||||||
if (e is SceneObjectGroup)
|
if (e is SceneObjectGroup)
|
||||||
m_pendingObjects.Enqueue((SceneObjectGroup)e);
|
m_pendingObjects.Enqueue((SceneObjectGroup)e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue