From 4a5979c31114272ec3f2e8742783b6918be93ad2 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 25 Jun 2010 21:09:15 +0100 Subject: [PATCH 01/11] minor: remove some mono compiler warnings --- .../Region/Physics/OdePlugin/ODEDynamics.cs | 2 +- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs index 9beeabba0a..2342bfa141 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs @@ -675,7 +675,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity d.Vector3 pos = d.BodyGetPosition(Body); - Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); +// Vector3 accel = new Vector3(-(m_dir.X - m_lastLinearVelocityVector.X / 0.1f), -(m_dir.Y - m_lastLinearVelocityVector.Y / 0.1f), m_dir.Z - m_lastLinearVelocityVector.Z / 0.1f); Vector3 posChange = new Vector3(); posChange.X = pos.X - m_lastPositionVector.X; posChange.Y = pos.Y - m_lastPositionVector.Y; diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 0720b5ee53..3cf45019e7 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1576,19 +1576,19 @@ Console.WriteLine(" JointCreateFixed"); //Console.WriteLine("Move " + m_primName); if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 // NON-'VEHICLES' are dealt with here - if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) - { - d.Vector3 avel2 = d.BodyGetAngularVel(Body); - /* - if (m_angularlock.X == 1) - avel2.X = 0; - if (m_angularlock.Y == 1) - avel2.Y = 0; - if (m_angularlock.Z == 1) - avel2.Z = 0; - d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); - */ - } +// if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) +// { +// d.Vector3 avel2 = d.BodyGetAngularVel(Body); +// /* +// if (m_angularlock.X == 1) +// avel2.X = 0; +// if (m_angularlock.Y == 1) +// avel2.Y = 0; +// if (m_angularlock.Z == 1) +// avel2.Z = 0; +// d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); +// */ +// } //float PID_P = 900.0f; float m_mass = CalculateMass(); From d399bd3eb7de6bab531087a1956f30457c3285ff Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 25 Jun 2010 21:18:52 +0100 Subject: [PATCH 02/11] minor: fix spelling mistake interupt -> interrupt in migrations This is for mantis 4783 --- OpenSim/Data/Migration.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 4f113a2f49..c177097ebd 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -67,7 +67,6 @@ namespace OpenSim.Data /// really want is the assembly of your database class. /// /// - public class Migration { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -173,8 +172,6 @@ namespace OpenSim.Data ExecuteScript(_conn, script); } - - public void Update() { InitMigrationsTable(); @@ -186,8 +183,8 @@ namespace OpenSim.Data return; // to prevent people from killing long migrations. - m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); - m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!"); + m_log.InfoFormat("[MIGRATIONS]: Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); + m_log.Info("[MIGRATIONS]: NOTE - this may take a while, don't interrupt this process!"); foreach (KeyValuePair kvp in migrations) { @@ -206,7 +203,7 @@ namespace OpenSim.Data } catch (Exception e) { - m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message.Replace("\n", " ")); + m_log.DebugFormat("[MIGRATIONS]: Cmd was {0}", e.Message.Replace("\n", " ")); m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing."); ExecuteScript("ROLLBACK;"); } From a4a808818f32b937a4228e9311e3e3b413a1b1d7 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 25 Jun 2010 21:48:19 +0100 Subject: [PATCH 03/11] don't report the null uuid as a missing asset on saving oars/iars --- .../Region/CoreModules/World/Archiver/AssetsRequest.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index a1451ce705..4d360f6be5 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -134,7 +134,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver foreach (KeyValuePair kvp in m_uuids) { - m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); + if (kvp.Key != UUID.Zero) + m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); } m_requestCallbackTimer.Enabled = true; @@ -269,7 +270,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver } catch (Exception e) { - m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e); + m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace); } } @@ -285,7 +286,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver catch (Exception e) { m_log.ErrorFormat( - "[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e); + "[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}", + e.Message, e.StackTrace); } } } From 19f18c8a1b6377fec44ebd358bb4d810d36bd586 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 27 Jun 2010 21:04:30 +0200 Subject: [PATCH 04/11] Make drag copy and copy-on-ray handle friends list perms properly --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 81ef54f949..dfcbc4cca0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1851,6 +1851,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 From 205d2496f6251244f69004c70b8c5db63b55bc98 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 27 Jun 2010 20:04:39 +0100 Subject: [PATCH 05/11] Fix permission propagation to prevent permanently locked objects from being created. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 64bdc99bb8..750b1f7f50 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -385,7 +385,7 @@ namespace OpenSim.Region.Framework.Scenes if (Permissions.PropagatePermissions() && recipient != senderId) { // First, make sore base is limited to the next perms - itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; + itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move); // By default, current equals base itemCopy.CurrentPermissions = itemCopy.BasePermissions; @@ -897,7 +897,7 @@ namespace OpenSim.Region.Framework.Scenes if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) { - agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions; + 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 ; @@ -1092,7 +1092,7 @@ namespace OpenSim.Region.Framework.Scenes destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & srcTaskItem.NextPermissions; destTaskItem.BasePermissions = srcTaskItem.BasePermissions & - srcTaskItem.NextPermissions; + (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); destTaskItem.CurrentPermissions |= 8; // Slam! } } From b0129b35f8dbe24b8e857223b3ac8ba4cb7cc830 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 27 Jun 2010 12:37:16 -0700 Subject: [PATCH 06/11] Added checks to XInventory DB layer to truncate names and descriptions. --- OpenSim/Data/MySQL/MySQLXInventoryData.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 0fe801d696..3c73095fc3 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs @@ -64,14 +64,22 @@ namespace OpenSim.Data.MySQL public bool StoreFolder(XInventoryFolder folder) { + if (folder.folderName.Length > 64) + folder.folderName = folder.folderName.Substring(0, 64); + return m_Folders.Store(folder); } public bool StoreItem(XInventoryItem item) { + if (item.inventoryName.Length > 64) + item.inventoryName = item.inventoryName.Substring(0, 64); + if (item.inventoryDescription.Length > 128) + item.inventoryDescription = item.inventoryDescription.Substring(0, 128); + return m_Items.Store(item); } - + public bool DeleteFolders(string field, string val) { return m_Folders.Delete(field, val); From 76d2f0f68e16f9b74ce4f81f9ecbf370f39f3ac6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 27 Jun 2010 12:40:17 -0700 Subject: [PATCH 07/11] Same patch as before but for SQLite. --- OpenSim/Data/SQLite/SQLiteXInventoryData.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs index 6064538990..ca651e1998 100644 --- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs +++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs @@ -66,11 +66,19 @@ namespace OpenSim.Data.SQLite public bool StoreFolder(XInventoryFolder folder) { + if (folder.folderName.Length > 64) + folder.folderName = folder.folderName.Substring(0, 64); + return m_Folders.Store(folder); } public bool StoreItem(XInventoryItem item) { + if (item.inventoryName.Length > 64) + item.inventoryName = item.inventoryName.Substring(0, 64); + if (item.inventoryDescription.Length > 128) + item.inventoryDescription = item.inventoryDescription.Substring(0, 128); + return m_Items.Store(item); } From 9c553cd254b5b27f3ddcffddee9684aeb4a6298b Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 27 Jun 2010 20:20:08 +0100 Subject: [PATCH 08/11] Fix more perms weirdness. Preserve "Locked" status across gives and rez/take. Preserve "Anyone can move" flag in most cases. --- .../Region/Framework/Scenes/Scene.Inventory.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 55c1575464..6532537fb3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -402,7 +402,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 @@ -413,7 +413,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; @@ -918,12 +918,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 @@ -1105,11 +1106,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! From d570cffa39e9ca6417ebd1c05cbdfea1d3beabd2 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 28 Jun 2010 01:29:30 +0200 Subject: [PATCH 09/11] 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. --- .../ClientStack/LindenUDP/LLClientView.cs | 6 +++--- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- .../Framework/Scenes/SceneObjectGroup.cs | 18 ++---------------- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f0718419d7..cf1dda9c6e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -6307,8 +6307,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); } } @@ -6898,7 +6898,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 dfcbc4cca0..69a909bc29 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1851,7 +1851,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 7081cedc5b..241295fd27 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1781,7 +1781,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; @@ -1806,16 +1808,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; lockPartsForRead(true); @@ -1837,12 +1829,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(); - } } } From a817f6b48c27fe5e950846d687edcd4d375a3c6c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 28 Jun 2010 01:48:24 +0200 Subject: [PATCH 10/11] 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 +- .../OptionalModules/ContentManagementSystem/MetaEntity.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 69a909bc29..a36800b57b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1848,7 +1848,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 241295fd27..c48ce3baa5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1700,7 +1700,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; @@ -1758,7 +1758,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; @@ -3897,7 +3897,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 c277034171..ada67011b3 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 1a72971b56..841ee00e59 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); } From 4fa1d4896c89d9907fe49f3ad718444b63c03ec9 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 28 Jun 2010 02:30:36 +0200 Subject: [PATCH 11/11] Change the way IRegionModule us referenced by IEmailModule to allow later conversion to new style --- .../Region/CoreModules/Scripting/EMailModules/EmailModule.cs | 2 +- OpenSim/Region/Framework/Interfaces/IEmailModule.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs index 83f004dc60..c0975eaaa0 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 3a2c4231cf..4f1b91adee 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);