From 3612a5252bdfe0a1d231fee669aa73183ee7b493 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 27 Jun 2010 20:20:08 +0100 Subject: Fix more perms weirdness. Preserve "Locked" status across gives and rez/take. Preserve "Anyone can move" flag in most cases. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 750b1f7..9278164 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -387,7 +387,7 @@ namespace OpenSim.Region.Framework.Scenes // First, make sore base is limited to the next perms itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move); // By default, current equals base - itemCopy.CurrentPermissions = itemCopy.BasePermissions; + itemCopy.CurrentPermissions = itemCopy.BasePermissions & item.CurrentPermissions; // If this is an object, replace current perms // with folded perms @@ -398,7 +398,7 @@ namespace OpenSim.Region.Framework.Scenes } // Ensure there is no escalation - itemCopy.CurrentPermissions &= item.NextPermissions; + itemCopy.CurrentPermissions &= (item.NextPermissions | (uint)PermissionMask.Move); // Need slam bit on xfer itemCopy.CurrentPermissions |= 8; @@ -899,12 +899,13 @@ namespace OpenSim.Region.Framework.Scenes { agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); if (taskItem.InvType == (int)InventoryType.Object) - agentItem.CurrentPermissions = agentItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13); - agentItem.CurrentPermissions = agentItem.BasePermissions ; + agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); + else + agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; agentItem.CurrentPermissions |= 8; agentItem.NextPermissions = taskItem.NextPermissions; - agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions; + agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; } else @@ -1086,11 +1087,11 @@ namespace OpenSim.Region.Framework.Scenes if (Permissions.PropagatePermissions()) { destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & - srcTaskItem.NextPermissions; + (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & - srcTaskItem.NextPermissions; + (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & - srcTaskItem.NextPermissions; + (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); destTaskItem.BasePermissions = srcTaskItem.BasePermissions & (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); destTaskItem.CurrentPermissions |= 8; // Slam! -- cgit v1.1 From 660a560d3ba0a4f4089fd173c30b3034f007d983 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 27 Jun 2010 21:04:30 +0200 Subject: Make drag copy and copy-on-ray handle friends list perms properly --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 240c688..ebb3005 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1750,6 +1750,28 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); copy.AbsolutePosition = copy.AbsolutePosition + offset; + if (copy.OwnerID != AgentID) + { + copy.SetOwnerId(AgentID); + copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID); + + List partList = + new List(copy.Children.Values); + + if (m_parentScene.Permissions.PropagatePermissions()) + { + foreach (SceneObjectPart child in partList) + { + child.Inventory.ChangeInventoryOwner(AgentID); + child.TriggerScriptChangedEvent(Changed.OWNER); + child.ApplyNextOwnerPermissions(); + } + } + + copy.RootPart.ObjectSaleType = 0; + copy.RootPart.SalePrice = 10; + } + Entities.Add(copy); // Since we copy from a source group that is in selected -- cgit v1.1 From 4cdda2cae9f91ac793bfaf192e94cbe4607c3886 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 28 Jun 2010 01:29:30 +0200 Subject: Fix Copy on Ray, Drag Copy and other little things. Removed the wrong and nonworking ownership assignment in SOG, which messed things up before. No longer trust the client to send the ID of the person something is copied as, since it allows to run a script with someone else's permissions. Properly adjust inventory ownership and perms. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++--- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 ++---------------- 3 files changed, 6 insertions(+), 20 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index cdd22de..d2824bd 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -6303,8 +6303,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerObjectDuplicate != null) { handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, - dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID, - AgentandGroupData.GroupID); + dupe.SharedData.DuplicateFlags, AgentId, + m_activeGroupID); } } @@ -6894,7 +6894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerObjectDuplicateOnRay != null) { handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags, - dupeOnRay.AgentData.AgentID, dupeOnRay.AgentData.GroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd, + AgentId, m_activeGroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd, dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection, dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates); } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index ebb3005..5fea332 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1750,7 +1750,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); copy.AbsolutePosition = copy.AbsolutePosition + offset; - if (copy.OwnerID != AgentID) + if (original.OwnerID != AgentID) { copy.SetOwnerId(AgentID); copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e23f39f..fad470f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1551,7 +1551,9 @@ namespace OpenSim.Region.Framework.Scenes dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); if (!userExposed) + { dupe.RootPart.IsAttachment = previousAttachmentStatus; + } dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; @@ -1576,16 +1578,6 @@ namespace OpenSim.Region.Framework.Scenes dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); } - // Now we've made a copy that replaces this one, we need to - // switch the owner to the person who did the copying - // Second Life copies an object and duplicates the first one in it's place - // So, we have to make a copy of this one, set it in it's place then set the owner on this one - if (userExposed) - { - SetRootPartOwner(m_rootPart, cAgentID, cGroupID); - m_rootPart.ScheduleFullUpdate(); - } - List partList; lock (m_parts) @@ -1606,12 +1598,6 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); newPart.LinkNum = part.LinkNum; - - if (userExposed) - { - SetPartOwner(newPart, cAgentID, cGroupID); - newPart.ScheduleFullUpdate(); - } } } -- cgit v1.1 From 85a9c305a202516b08b566b1120750010461022c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 28 Jun 2010 01:48:24 +0200 Subject: Remove AgentID and GroupOD from the signature of SOG.Copy(). They were never used, but made for a very mispleading read of the code in the callers. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 +++--- .../ContentManagementSystem/ContentManagementEntity.cs | 2 +- .../Region/OptionalModules/ContentManagementSystem/MetaEntity.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5fea332..40332a6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1747,7 +1747,7 @@ namespace OpenSim.Region.Framework.Scenes { if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition)) { - SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); + SceneObjectGroup copy = original.Copy(true); copy.AbsolutePosition = copy.AbsolutePosition + offset; if (original.OwnerID != AgentID) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fad470f..1ca390a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1472,7 +1472,7 @@ namespace OpenSim.Region.Framework.Scenes "[SCENE]: Storing {0}, {1} in {2}", Name, UUID, m_scene.RegionInfo.RegionName); - SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); + SceneObjectGroup backup_group = Copy(false); backup_group.RootPart.Velocity = RootPart.Velocity; backup_group.RootPart.Acceleration = RootPart.Acceleration; backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; @@ -1528,7 +1528,7 @@ namespace OpenSim.Region.Framework.Scenes /// Duplicates this object, including operations such as physics set up and attaching to the backup event. /// /// - public SceneObjectGroup Copy(UUID cAgentID, UUID cGroupID, bool userExposed) + public SceneObjectGroup Copy(bool userExposed) { SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); dupe.m_isBackedUp = false; @@ -3581,7 +3581,7 @@ namespace OpenSim.Region.Framework.Scenes public virtual ISceneObject CloneForNewScene() { - SceneObjectGroup sog = Copy(this.OwnerID, this.GroupID, false); + SceneObjectGroup sog = Copy(false); sog.m_isDeleted = false; return sog; } diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs index c277034..ada6701 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs @@ -73,7 +73,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement public ContentManagementEntity(SceneObjectGroup Unchanged, bool physics) : base(Unchanged, false) { - m_UnchangedEntity = Unchanged.Copy(Unchanged.RootPart.OwnerID, Unchanged.RootPart.GroupID, false); + m_UnchangedEntity = Unchanged.Copy(false); } public ContentManagementEntity(string objectXML, Scene scene, bool physics) diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs index 1a72971..841ee00 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs @@ -80,7 +80,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement /// public MetaEntity(SceneObjectGroup orig, bool physics) { - m_Entity = orig.Copy(orig.RootPart.OwnerID, orig.RootPart.GroupID, false); + m_Entity = orig.Copy(false); Initialize(physics); } -- cgit v1.1 From 0a82d10fc4827d4c537b5d23f0654d80ba89a2a3 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 28 Jun 2010 02:30:36 +0200 Subject: Change the way IRegionModule us referenced by IEmailModule to allow later conversion to new style --- OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs | 2 +- OpenSim/Region/Framework/Interfaces/IEmailModule.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs index 83f004d..c0975ea 100644 --- a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs @@ -40,7 +40,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.CoreModules.Scripting.EmailModules { - public class EmailModule : IEmailModule + public class EmailModule : IRegionModule, IEmailModule { // // Log diff --git a/OpenSim/Region/Framework/Interfaces/IEmailModule.cs b/OpenSim/Region/Framework/Interfaces/IEmailModule.cs index 3a2c423..4f1b91a 100644 --- a/OpenSim/Region/Framework/Interfaces/IEmailModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEmailModule.cs @@ -38,7 +38,7 @@ namespace OpenSim.Region.Framework.Interfaces public int numLeft; } - public interface IEmailModule : IRegionModule + public interface IEmailModule { void SendEmail(UUID objectID, string address, string subject, string body); Email GetNextEmail(UUID objectID, string sender, string subject); -- cgit v1.1 From d1233501648d4c76abb259faf2a30095bc99b3f6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 28 Jun 2010 16:04:12 -0700 Subject: One more bug fix in FriendsModule: GrantRights. One of the caches was not being updated. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 5552be7..6f044cb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -768,8 +768,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends bool canEditObjectsChanged = ((rights ^ userFlags) & (int)FriendRights.CanModifyObjects) != 0; if (canEditObjectsChanged) friendClient.SendChangeUserRights(userID, friendID, rights); + } + // update local cache + //m_Friends[friendID].Friends = m_FriendsService.GetFriends(friendID); + foreach (FriendInfo finfo in m_Friends[friendID].Friends) + if (finfo.Friend == userID.ToString()) + finfo.TheirFlags = rights; + return true; } -- cgit v1.1 From 621195e4f182d475b087049f4489e4c9187dd474 Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 28 Jun 2010 17:33:47 -0700 Subject: Thanks Micheil Merlin for Mantis #4784: [PATCH] llRotBetween does not return correct rotations for a 180 degree angle between vectors Signed-off-by: dahlia --- .../Shared/Api/Implementation/LSL_Api.cs | 89 +++++++++++++++++----- 1 file changed, 71 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1feb153..dc34e1c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -703,24 +703,77 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) { - //A and B should both be normalized - m_host.AddScriptLPS(1); - double dotProduct = LSL_Vector.Dot(a, b); - LSL_Vector crossProduct = LSL_Vector.Cross(a, b); - double magProduct = LSL_Vector.Mag(a) * LSL_Vector.Mag(b); - double angle = Math.Acos(dotProduct / magProduct); - LSL_Vector axis = LSL_Vector.Norm(crossProduct); - double s = Math.Sin(angle / 2); - - double x = axis.x * s; - double y = axis.y * s; - double z = axis.z * s; - double w = Math.Cos(angle / 2); - - if (Double.IsNaN(x) || Double.IsNaN(y) || Double.IsNaN(z) || Double.IsNaN(w)) - return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); - - return new LSL_Rotation((float)x, (float)y, (float)z, (float)w); + //A and B should both be normalized + m_host.AddScriptLPS(1); + LSL_Rotation rotBetween; + // Check for zero vectors. If either is zero, return zero rotation. Otherwise, + // continue calculation. + if (a == new LSL_Vector(0.0f, 0.0f, 0.0f) || b == new LSL_Vector(0.0f, 0.0f, 0.0f)) + { + rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); + } + else + { + a = LSL_Vector.Norm(a); + b = LSL_Vector.Norm(b); + double dotProduct = LSL_Vector.Dot(a, b); + // There are two degenerate cases possible. These are for vectors 180 or + // 0 degrees apart. These have to be detected and handled individually. + // + // Check for vectors 180 degrees apart. + // A dot product of -1 would mean the angle between vectors is 180 degrees. + if (dotProduct < -0.9999999f) + { + // First assume X axis is orthogonal to the vectors. + LSL_Vector orthoVector = new LSL_Vector(1.0f, 0.0f, 0.0f); + orthoVector = orthoVector - a * (a.x / LSL_Vector.Dot(a, a)); + // Check for near zero vector. A very small non-zero number here will create + // a rotation in an undesired direction. + if (LSL_Vector.Mag(orthoVector) > 0.0001) + { + rotBetween = new LSL_Rotation(orthoVector.x, orthoVector.y, orthoVector.z, 0.0f); + } + // If the magnitude of the vector was near zero, then assume the X axis is not + // orthogonal and use the Z axis instead. + else + { + // Set 180 z rotation. + rotBetween = new LSL_Rotation(0.0f, 0.0f, 1.0f, 0.0f); + } + } + // Check for parallel vectors. + // A dot product of 1 would mean the angle between vectors is 0 degrees. + else if (dotProduct > 0.9999999f) + { + // Set zero rotation. + rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); + } + else + { + // All special checks have been performed so get the axis of rotation. + LSL_Vector crossProduct = LSL_Vector.Cross(a, b); + // Quarternion s value is the length of the unit vector + dot product. + double qs = 1.0 + dotProduct; + rotBetween = new LSL_Rotation(crossProduct.x, crossProduct.y, crossProduct.z, qs); + // Normalize the rotation. + double mag = LSL_Rotation.Mag(rotBetween); + // We shouldn't have to worry about a divide by zero here. The qs value will be + // non-zero because we already know if we're here, then the dotProduct is not -1 so + // qs will not be zero. Also, we've already handled the input vectors being zero so the + // crossProduct vector should also not be zero. + rotBetween.x = rotBetween.x / mag; + rotBetween.y = rotBetween.y / mag; + rotBetween.z = rotBetween.z / mag; + rotBetween.s = rotBetween.s / mag; + // Check for undefined values and set zero rotation if any found. This code might not actually be required + // any longer since zero vectors are checked for at the top. + if (Double.IsNaN(rotBetween.x) || Double.IsNaN(rotBetween.y) || Double.IsNaN(rotBetween.z) || Double.IsNaN(rotBetween.s)) + { + rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); + } + } + } + return rotBetween; } public void llWhisper(int channelID, string text) -- cgit v1.1 From 9fde9085a0fcd2e78b01724e0b7e826156d23f53 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Jun 2010 02:07:10 -0700 Subject: Bug fix in HG standalone: wrong handler in the in module. Fixed a few broken comments in InventoryAccessModule. --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 13 ++----------- .../Inventory/InventoryServiceInConnectorModule.cs | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 3035d88..12b6aa0 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -286,23 +286,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { // Deleting someone else's item // - - if (remoteClient == null || objectGroup.OwnerID != remoteClient.AgentId) { - // Folder skeleton may not be loaded and we - // have to wait for the inventory to find - // the destination folder - // + folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder); } else { - // Assume inventory skeleton was loaded during login - // and all folders can be found - // - folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder); + folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder); } } else if (action == DeRezAction.Return) @@ -332,7 +324,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (folder == null) // None of the above { - //folder = userInfo.RootFolder.FindFolder(folderID); folder = new InventoryFolderBase(folderID); if (folder == null) // Nowhere to put it diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs index ae03cdf..209cf0d 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs @@ -96,7 +96,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory Object[] args = new Object[] { m_Config, MainServer.Instance, "HGInventoryService" }; - ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:HGInventoryServiceInConnector", args); + ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:XInventoryInConnector", args); } } -- cgit v1.1 From 08e338979062268aa6c82fbe83903de5bcd77f30 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Jun 2010 04:38:15 -0700 Subject: Buglet fix in HG inventory. Make sure that GetRootFolder for non-HG xinventory is the folder "My Inventory". Also changed the Suitcase folder name to "My Suitcase". --- .../CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 2ab46aa..58c396c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return ret; } - public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, + public override UUID DeleteToInventory(DeRezAction action, UUID folderID, SceneObjectGroup objectGroup, IClientAPI remoteClient) { UUID assetID = base.DeleteToInventory(action, folderID, new List() {objectGroup}, remoteClient); -- cgit v1.1 From cf15558c9ec7dcee3e5d4ff7bab57171450c3eec Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Jun 2010 06:25:12 -0700 Subject: This file wants to be committed. --- .../Shared/Api/Implementation/LSL_Api.cs | 140 ++++++++++----------- 1 file changed, 70 insertions(+), 70 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index dc34e1c..712bd7d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -703,76 +703,76 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) { - //A and B should both be normalized - m_host.AddScriptLPS(1); - LSL_Rotation rotBetween; - // Check for zero vectors. If either is zero, return zero rotation. Otherwise, - // continue calculation. - if (a == new LSL_Vector(0.0f, 0.0f, 0.0f) || b == new LSL_Vector(0.0f, 0.0f, 0.0f)) - { - rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); - } - else - { - a = LSL_Vector.Norm(a); - b = LSL_Vector.Norm(b); - double dotProduct = LSL_Vector.Dot(a, b); - // There are two degenerate cases possible. These are for vectors 180 or - // 0 degrees apart. These have to be detected and handled individually. - // - // Check for vectors 180 degrees apart. - // A dot product of -1 would mean the angle between vectors is 180 degrees. - if (dotProduct < -0.9999999f) - { - // First assume X axis is orthogonal to the vectors. - LSL_Vector orthoVector = new LSL_Vector(1.0f, 0.0f, 0.0f); - orthoVector = orthoVector - a * (a.x / LSL_Vector.Dot(a, a)); - // Check for near zero vector. A very small non-zero number here will create - // a rotation in an undesired direction. - if (LSL_Vector.Mag(orthoVector) > 0.0001) - { - rotBetween = new LSL_Rotation(orthoVector.x, orthoVector.y, orthoVector.z, 0.0f); - } - // If the magnitude of the vector was near zero, then assume the X axis is not - // orthogonal and use the Z axis instead. - else - { - // Set 180 z rotation. - rotBetween = new LSL_Rotation(0.0f, 0.0f, 1.0f, 0.0f); - } - } - // Check for parallel vectors. - // A dot product of 1 would mean the angle between vectors is 0 degrees. - else if (dotProduct > 0.9999999f) - { - // Set zero rotation. - rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); - } - else - { - // All special checks have been performed so get the axis of rotation. - LSL_Vector crossProduct = LSL_Vector.Cross(a, b); - // Quarternion s value is the length of the unit vector + dot product. - double qs = 1.0 + dotProduct; - rotBetween = new LSL_Rotation(crossProduct.x, crossProduct.y, crossProduct.z, qs); - // Normalize the rotation. - double mag = LSL_Rotation.Mag(rotBetween); - // We shouldn't have to worry about a divide by zero here. The qs value will be - // non-zero because we already know if we're here, then the dotProduct is not -1 so - // qs will not be zero. Also, we've already handled the input vectors being zero so the - // crossProduct vector should also not be zero. - rotBetween.x = rotBetween.x / mag; - rotBetween.y = rotBetween.y / mag; - rotBetween.z = rotBetween.z / mag; - rotBetween.s = rotBetween.s / mag; - // Check for undefined values and set zero rotation if any found. This code might not actually be required - // any longer since zero vectors are checked for at the top. - if (Double.IsNaN(rotBetween.x) || Double.IsNaN(rotBetween.y) || Double.IsNaN(rotBetween.z) || Double.IsNaN(rotBetween.s)) - { - rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); - } - } - } + //A and B should both be normalized + m_host.AddScriptLPS(1); + LSL_Rotation rotBetween; + // Check for zero vectors. If either is zero, return zero rotation. Otherwise, + // continue calculation. + if (a == new LSL_Vector(0.0f, 0.0f, 0.0f) || b == new LSL_Vector(0.0f, 0.0f, 0.0f)) + { + rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); + } + else + { + a = LSL_Vector.Norm(a); + b = LSL_Vector.Norm(b); + double dotProduct = LSL_Vector.Dot(a, b); + // There are two degenerate cases possible. These are for vectors 180 or + // 0 degrees apart. These have to be detected and handled individually. + // + // Check for vectors 180 degrees apart. + // A dot product of -1 would mean the angle between vectors is 180 degrees. + if (dotProduct < -0.9999999f) + { + // First assume X axis is orthogonal to the vectors. + LSL_Vector orthoVector = new LSL_Vector(1.0f, 0.0f, 0.0f); + orthoVector = orthoVector - a * (a.x / LSL_Vector.Dot(a, a)); + // Check for near zero vector. A very small non-zero number here will create + // a rotation in an undesired direction. + if (LSL_Vector.Mag(orthoVector) > 0.0001) + { + rotBetween = new LSL_Rotation(orthoVector.x, orthoVector.y, orthoVector.z, 0.0f); + } + // If the magnitude of the vector was near zero, then assume the X axis is not + // orthogonal and use the Z axis instead. + else + { + // Set 180 z rotation. + rotBetween = new LSL_Rotation(0.0f, 0.0f, 1.0f, 0.0f); + } + } + // Check for parallel vectors. + // A dot product of 1 would mean the angle between vectors is 0 degrees. + else if (dotProduct > 0.9999999f) + { + // Set zero rotation. + rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); + } + else + { + // All special checks have been performed so get the axis of rotation. + LSL_Vector crossProduct = LSL_Vector.Cross(a, b); + // Quarternion s value is the length of the unit vector + dot product. + double qs = 1.0 + dotProduct; + rotBetween = new LSL_Rotation(crossProduct.x, crossProduct.y, crossProduct.z, qs); + // Normalize the rotation. + double mag = LSL_Rotation.Mag(rotBetween); + // We shouldn't have to worry about a divide by zero here. The qs value will be + // non-zero because we already know if we're here, then the dotProduct is not -1 so + // qs will not be zero. Also, we've already handled the input vectors being zero so the + // crossProduct vector should also not be zero. + rotBetween.x = rotBetween.x / mag; + rotBetween.y = rotBetween.y / mag; + rotBetween.z = rotBetween.z / mag; + rotBetween.s = rotBetween.s / mag; + // Check for undefined values and set zero rotation if any found. This code might not actually be required + // any longer since zero vectors are checked for at the top. + if (Double.IsNaN(rotBetween.x) || Double.IsNaN(rotBetween.y) || Double.IsNaN(rotBetween.z) || Double.IsNaN(rotBetween.s)) + { + rotBetween = new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f); + } + } + } return rotBetween; } -- cgit v1.1 From c607e6f3b8de5f04e0c9114893b11256fa922272 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Jun 2010 20:28:48 +0100 Subject: Revert "don't report the null uuid as a missing asset on saving oars/iars" This reverts commit 5ce119174e03715bfc61f7864bd3e7182c5d21ea. This change led to infinite timeout since the expected number of assets no longer matched requests. Rather than introduce yet fresh bugs with another fix, just revert this since the inaccurate report is just inconvenient --- OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 4d360f6..a1451ce 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -134,8 +134,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver foreach (KeyValuePair kvp in m_uuids) { - if (kvp.Key != UUID.Zero) - m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); + m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); } m_requestCallbackTimer.Enabled = true; @@ -270,7 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver } catch (Exception e) { - m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace); + m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e); } } @@ -286,8 +285,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver catch (Exception e) { m_log.ErrorFormat( - "[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}", - e.Message, e.StackTrace); + "[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e); } } } -- cgit v1.1 From 5964084d25ab534e0eb888b44fefea8ee3e51a7d Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 29 Jun 2010 20:36:17 +0100 Subject: Fix a nullref on autoreturn --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9278164..f9da341 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1574,13 +1574,25 @@ namespace OpenSim.Region.Framework.Scenes // for when deleting the object from it ForceSceneObjectBackup(grp); - if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) + if (remoteClient == null) + { + // Autoreturn has a null client. Nothing else does. So + // allow only returns + if (action != DeRezAction.Return) + return; + permissionToTakeCopy = false; - if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) - permissionToTake = false; + } + else + { + if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) + permissionToTakeCopy = false; + if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) + permissionToTake = false; - if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) - permissionToDelete = false; + if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) + permissionToDelete = false; + } } -- cgit v1.1 From 94cb6fc916e1bd039f2b59214e68a0b3c4847445 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Jun 2010 18:54:31 +0100 Subject: stop exceptions in setting and getting state from propogating since they aren't fatal to operations this will hopefully stop "save oar" from failing if a script asset is corrupt --- .../Framework/Scenes/SceneObjectPartInventory.cs | 39 +++++++++++++++++----- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 3a8f168..a6067ad 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -218,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (IScriptModule e in engines) { if (e != null) - { + { ArrayList errors = e.GetScriptErrors(itemID); foreach (Object line in errors) ret.Add(line); @@ -356,14 +356,26 @@ namespace OpenSim.Region.Framework.Scenes m_part.ParentGroup.m_savedScriptState[oldID] = newDoc.OuterXml; } + foreach (IScriptModule e in engines) { if (e != null) { - if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) - break; + // Stop an exception in setting saved state from propogating since this is not fatal. + try + { + if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) + break; + } + catch (Exception ex) + { + m_log.WarnFormat( + "[PRIM INVENTORY]: Could not set script state for old key {0}, new key {1} in prim {2} {3}. Exception {4}{5}", + oldID, newID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); + } } } + m_part.ParentGroup.m_savedScriptState.Remove(oldID); } } @@ -1021,12 +1033,23 @@ namespace OpenSim.Region.Framework.Scenes { if (e != null) { - string n = e.GetXMLState(item.ItemID); - if (n != String.Empty) + // Stop any exception from the script engine from propogating since setting state + // isn't essential. + try + { + string n = e.GetXMLState(item.ItemID); + if (n != String.Empty) + { + if (!ret.ContainsKey(item.ItemID)) + ret[item.ItemID] = n; + break; + } + } + catch (Exception ex) { - if (!ret.ContainsKey(item.ItemID)) - ret[item.ItemID] = n; - break; + m_log.WarnFormat( + "[PRIM INVENTORY]: Could not retrieve script state for item {0} {1} in prim {2} {3}. Exception {4}{5}", + item.Name, item.ItemID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); } } } -- cgit v1.1 From 6701fc2ffa426912fe7a4b208eaeec6d2defce15 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 29 Jun 2010 21:50:52 +0100 Subject: Fix the XML serializationt to provide an empty script state element if the script hasn't yet saved state, or can't save state because of a loop --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 32 ++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 61a2088..4715690 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1274,9 +1274,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine string xml = instance.GetXMLState(); XmlDocument sdoc = new XmlDocument(); - sdoc.LoadXml(xml); - XmlNodeList rootL = sdoc.GetElementsByTagName("ScriptState"); - XmlNode rootNode = rootL[0]; + bool loadedState = true; + try + { + sdoc.LoadXml(xml); + } + catch (System.Xml.XmlException e) + { + loadedState = false; + } + + XmlNodeList rootL = null; + XmlNode rootNode = null; + if (loadedState) + { + rootL = sdoc.GetElementsByTagName("ScriptState"); + rootNode = rootL[0]; + } // Create XmlDocument doc = new XmlDocument(); @@ -1292,8 +1306,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine stateData.Attributes.Append(engineName); doc.AppendChild(stateData); + XmlNode xmlstate = null; + // Add ... - XmlNode xmlstate = doc.ImportNode(rootNode, true); + if (loadedState) + { + xmlstate = doc.ImportNode(rootNode, true); + } + else + { + xmlstate = doc.CreateElement("", "ScriptState", ""); + } + stateData.AppendChild(xmlstate); string assemName = instance.GetAssemblyName(); -- cgit v1.1 From d06b977ed1a0472fbf15da0d4d7ae68b40936fb8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Jun 2010 14:21:48 -0700 Subject: Remove the override from DeletToInventory in HGInventoryAccessModule. This may be causing the infinite loop, not sure. --- .../CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 58c396c..b0555da 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -131,7 +131,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return ret; } - public override UUID DeleteToInventory(DeRezAction action, UUID folderID, + // DO NOT OVERRIDE THIS METHOD + public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, SceneObjectGroup objectGroup, IClientAPI remoteClient) { UUID assetID = base.DeleteToInventory(action, folderID, new List() {objectGroup}, remoteClient); -- cgit v1.1 From be0af01061f24b714022a72573374c2178a94251 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Jun 2010 23:43:38 +0100 Subject: Revert "stop exceptions in setting and getting state from propogating since they aren't fatal to operations" This reverts commit 94cb6fc916e1bd039f2b59214e68a0b3c4847445. --- .../Framework/Scenes/SceneObjectPartInventory.cs | 39 +++++----------------- 1 file changed, 8 insertions(+), 31 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index a6067ad..3a8f168 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -218,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (IScriptModule e in engines) { if (e != null) - { + { ArrayList errors = e.GetScriptErrors(itemID); foreach (Object line in errors) ret.Add(line); @@ -356,26 +356,14 @@ namespace OpenSim.Region.Framework.Scenes m_part.ParentGroup.m_savedScriptState[oldID] = newDoc.OuterXml; } - foreach (IScriptModule e in engines) { if (e != null) { - // Stop an exception in setting saved state from propogating since this is not fatal. - try - { - if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) - break; - } - catch (Exception ex) - { - m_log.WarnFormat( - "[PRIM INVENTORY]: Could not set script state for old key {0}, new key {1} in prim {2} {3}. Exception {4}{5}", - oldID, newID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); - } + if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) + break; } } - m_part.ParentGroup.m_savedScriptState.Remove(oldID); } } @@ -1033,23 +1021,12 @@ namespace OpenSim.Region.Framework.Scenes { if (e != null) { - // Stop any exception from the script engine from propogating since setting state - // isn't essential. - try - { - string n = e.GetXMLState(item.ItemID); - if (n != String.Empty) - { - if (!ret.ContainsKey(item.ItemID)) - ret[item.ItemID] = n; - break; - } - } - catch (Exception ex) + string n = e.GetXMLState(item.ItemID); + if (n != String.Empty) { - m_log.WarnFormat( - "[PRIM INVENTORY]: Could not retrieve script state for item {0} {1} in prim {2} {3}. Exception {4}{5}", - item.Name, item.ItemID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); + if (!ret.ContainsKey(item.ItemID)) + ret[item.ItemID] = n; + break; } } } -- cgit v1.1 From 1db2921782c4d16e3a1be09de3ef499094d947f2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Jun 2010 21:25:39 +0100 Subject: Fix scripts in rezzed objects not starting (Mantis #4775) --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 4715690..808cf82 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -488,6 +488,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (stateSource == (int)StateSource.ScriptedRez) { + lock (m_CompileDict) + { + m_CompileDict[itemID] = 0; + } + DoOnRezScript(parms); } else -- cgit v1.1