diff options
14 files changed, 86 insertions, 62 deletions
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 4f113a2..c177097 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs | |||
@@ -67,7 +67,6 @@ namespace OpenSim.Data | |||
67 | /// really want is the assembly of your database class. | 67 | /// really want is the assembly of your database class. |
68 | /// | 68 | /// |
69 | /// </summary> | 69 | /// </summary> |
70 | |||
71 | public class Migration | 70 | public class Migration |
72 | { | 71 | { |
73 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 72 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -173,8 +172,6 @@ namespace OpenSim.Data | |||
173 | ExecuteScript(_conn, script); | 172 | ExecuteScript(_conn, script); |
174 | } | 173 | } |
175 | 174 | ||
176 | |||
177 | |||
178 | public void Update() | 175 | public void Update() |
179 | { | 176 | { |
180 | InitMigrationsTable(); | 177 | InitMigrationsTable(); |
@@ -186,8 +183,8 @@ namespace OpenSim.Data | |||
186 | return; | 183 | return; |
187 | 184 | ||
188 | // to prevent people from killing long migrations. | 185 | // to prevent people from killing long migrations. |
189 | m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); | 186 | m_log.InfoFormat("[MIGRATIONS]: Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); |
190 | m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!"); | 187 | m_log.Info("[MIGRATIONS]: NOTE - this may take a while, don't interrupt this process!"); |
191 | 188 | ||
192 | foreach (KeyValuePair<int, string[]> kvp in migrations) | 189 | foreach (KeyValuePair<int, string[]> kvp in migrations) |
193 | { | 190 | { |
@@ -206,7 +203,7 @@ namespace OpenSim.Data | |||
206 | } | 203 | } |
207 | catch (Exception e) | 204 | catch (Exception e) |
208 | { | 205 | { |
209 | m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message.Replace("\n", " ")); | 206 | m_log.DebugFormat("[MIGRATIONS]: Cmd was {0}", e.Message.Replace("\n", " ")); |
210 | 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."); | 207 | 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."); |
211 | ExecuteScript("ROLLBACK;"); | 208 | ExecuteScript("ROLLBACK;"); |
212 | } | 209 | } |
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 0fe801d..3c73095 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs | |||
@@ -64,14 +64,22 @@ namespace OpenSim.Data.MySQL | |||
64 | 64 | ||
65 | public bool StoreFolder(XInventoryFolder folder) | 65 | public bool StoreFolder(XInventoryFolder folder) |
66 | { | 66 | { |
67 | if (folder.folderName.Length > 64) | ||
68 | folder.folderName = folder.folderName.Substring(0, 64); | ||
69 | |||
67 | return m_Folders.Store(folder); | 70 | return m_Folders.Store(folder); |
68 | } | 71 | } |
69 | 72 | ||
70 | public bool StoreItem(XInventoryItem item) | 73 | public bool StoreItem(XInventoryItem item) |
71 | { | 74 | { |
75 | if (item.inventoryName.Length > 64) | ||
76 | item.inventoryName = item.inventoryName.Substring(0, 64); | ||
77 | if (item.inventoryDescription.Length > 128) | ||
78 | item.inventoryDescription = item.inventoryDescription.Substring(0, 128); | ||
79 | |||
72 | return m_Items.Store(item); | 80 | return m_Items.Store(item); |
73 | } | 81 | } |
74 | 82 | ||
75 | public bool DeleteFolders(string field, string val) | 83 | public bool DeleteFolders(string field, string val) |
76 | { | 84 | { |
77 | return m_Folders.Delete(field, val); | 85 | return m_Folders.Delete(field, val); |
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs index 6064538..ca651e1 100644 --- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs +++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs | |||
@@ -66,11 +66,19 @@ namespace OpenSim.Data.SQLite | |||
66 | 66 | ||
67 | public bool StoreFolder(XInventoryFolder folder) | 67 | public bool StoreFolder(XInventoryFolder folder) |
68 | { | 68 | { |
69 | if (folder.folderName.Length > 64) | ||
70 | folder.folderName = folder.folderName.Substring(0, 64); | ||
71 | |||
69 | return m_Folders.Store(folder); | 72 | return m_Folders.Store(folder); |
70 | } | 73 | } |
71 | 74 | ||
72 | public bool StoreItem(XInventoryItem item) | 75 | public bool StoreItem(XInventoryItem item) |
73 | { | 76 | { |
77 | if (item.inventoryName.Length > 64) | ||
78 | item.inventoryName = item.inventoryName.Substring(0, 64); | ||
79 | if (item.inventoryDescription.Length > 128) | ||
80 | item.inventoryDescription = item.inventoryDescription.Substring(0, 128); | ||
81 | |||
74 | return m_Items.Store(item); | 82 | return m_Items.Store(item); |
75 | } | 83 | } |
76 | 84 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 5b5dc1e..14b716b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -6316,8 +6316,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6316 | if (handlerObjectDuplicate != null) | 6316 | if (handlerObjectDuplicate != null) |
6317 | { | 6317 | { |
6318 | handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, | 6318 | handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, |
6319 | dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID, | 6319 | dupe.SharedData.DuplicateFlags, AgentId, |
6320 | AgentandGroupData.GroupID); | 6320 | m_activeGroupID); |
6321 | } | 6321 | } |
6322 | } | 6322 | } |
6323 | 6323 | ||
@@ -6907,7 +6907,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6907 | if (handlerObjectDuplicateOnRay != null) | 6907 | if (handlerObjectDuplicateOnRay != null) |
6908 | { | 6908 | { |
6909 | handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags, | 6909 | handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags, |
6910 | dupeOnRay.AgentData.AgentID, dupeOnRay.AgentData.GroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd, | 6910 | AgentId, m_activeGroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd, |
6911 | dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection, | 6911 | dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection, |
6912 | dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates); | 6912 | dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates); |
6913 | } | 6913 | } |
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; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.CoreModules.Scripting.EmailModules | 41 | namespace OpenSim.Region.CoreModules.Scripting.EmailModules |
42 | { | 42 | { |
43 | public class EmailModule : IEmailModule | 43 | public class EmailModule : IRegionModule, IEmailModule |
44 | { | 44 | { |
45 | // | 45 | // |
46 | // Log | 46 | // Log |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index a1451ce..4d360f6 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 | |||
134 | 134 | ||
135 | foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids) | 135 | foreach (KeyValuePair<UUID, AssetType> kvp in m_uuids) |
136 | { | 136 | { |
137 | m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); | 137 | if (kvp.Key != UUID.Zero) |
138 | m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); | ||
138 | } | 139 | } |
139 | 140 | ||
140 | m_requestCallbackTimer.Enabled = true; | 141 | m_requestCallbackTimer.Enabled = true; |
@@ -269,7 +270,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
269 | } | 270 | } |
270 | catch (Exception e) | 271 | catch (Exception e) |
271 | { | 272 | { |
272 | m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e); | 273 | m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace); |
273 | } | 274 | } |
274 | } | 275 | } |
275 | 276 | ||
@@ -285,7 +286,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
285 | catch (Exception e) | 286 | catch (Exception e) |
286 | { | 287 | { |
287 | m_log.ErrorFormat( | 288 | m_log.ErrorFormat( |
288 | "[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e); | 289 | "[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}", |
290 | e.Message, e.StackTrace); | ||
289 | } | 291 | } |
290 | } | 292 | } |
291 | } | 293 | } |
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 | |||
38 | public int numLeft; | 38 | public int numLeft; |
39 | } | 39 | } |
40 | 40 | ||
41 | public interface IEmailModule : IRegionModule | 41 | public interface IEmailModule |
42 | { | 42 | { |
43 | void SendEmail(UUID objectID, string address, string subject, string body); | 43 | void SendEmail(UUID objectID, string address, string subject, string body); |
44 | Email GetNextEmail(UUID objectID, string sender, string subject); | 44 | Email GetNextEmail(UUID objectID, string sender, string subject); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0380199..6532537 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -400,9 +400,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
400 | if (Permissions.PropagatePermissions() && recipient != senderId) | 400 | if (Permissions.PropagatePermissions() && recipient != senderId) |
401 | { | 401 | { |
402 | // First, make sore base is limited to the next perms | 402 | // First, make sore base is limited to the next perms |
403 | itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; | 403 | itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move); |
404 | // By default, current equals base | 404 | // By default, current equals base |
405 | itemCopy.CurrentPermissions = itemCopy.BasePermissions; | 405 | itemCopy.CurrentPermissions = itemCopy.BasePermissions & item.CurrentPermissions; |
406 | 406 | ||
407 | // If this is an object, replace current perms | 407 | // If this is an object, replace current perms |
408 | // with folded perms | 408 | // with folded perms |
@@ -413,7 +413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
413 | } | 413 | } |
414 | 414 | ||
415 | // Ensure there is no escalation | 415 | // Ensure there is no escalation |
416 | itemCopy.CurrentPermissions &= item.NextPermissions; | 416 | itemCopy.CurrentPermissions &= (item.NextPermissions | (uint)PermissionMask.Move); |
417 | 417 | ||
418 | // Need slam bit on xfer | 418 | // Need slam bit on xfer |
419 | itemCopy.CurrentPermissions |= 8; | 419 | itemCopy.CurrentPermissions |= 8; |
@@ -916,14 +916,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
916 | 916 | ||
917 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) | 917 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) |
918 | { | 918 | { |
919 | agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions; | 919 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
920 | if (taskItem.InvType == (int)InventoryType.Object) | 920 | if (taskItem.InvType == (int)InventoryType.Object) |
921 | agentItem.CurrentPermissions = agentItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13); | 921 | agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); |
922 | agentItem.CurrentPermissions = agentItem.BasePermissions ; | 922 | else |
923 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | ||
923 | 924 | ||
924 | agentItem.CurrentPermissions |= 8; | 925 | agentItem.CurrentPermissions |= 8; |
925 | agentItem.NextPermissions = taskItem.NextPermissions; | 926 | agentItem.NextPermissions = taskItem.NextPermissions; |
926 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions; | 927 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
927 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; | 928 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; |
928 | } | 929 | } |
929 | else | 930 | else |
@@ -1105,13 +1106,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1105 | if (Permissions.PropagatePermissions()) | 1106 | if (Permissions.PropagatePermissions()) |
1106 | { | 1107 | { |
1107 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & | 1108 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & |
1108 | srcTaskItem.NextPermissions; | 1109 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1109 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & | 1110 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & |
1110 | srcTaskItem.NextPermissions; | 1111 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1111 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & | 1112 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & |
1112 | srcTaskItem.NextPermissions; | 1113 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1113 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & | 1114 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & |
1114 | srcTaskItem.NextPermissions; | 1115 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1115 | destTaskItem.CurrentPermissions |= 8; // Slam! | 1116 | destTaskItem.CurrentPermissions |= 8; // Slam! |
1116 | } | 1117 | } |
1117 | } | 1118 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 81ef54f..a36800b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1848,9 +1848,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
1848 | { | 1848 | { |
1849 | if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition)) | 1849 | if (m_parentScene.Permissions.CanDuplicateObject(original.Children.Count, original.UUID, AgentID, original.AbsolutePosition)) |
1850 | { | 1850 | { |
1851 | SceneObjectGroup copy = original.Copy(AgentID, GroupID, true); | 1851 | SceneObjectGroup copy = original.Copy(true); |
1852 | copy.AbsolutePosition = copy.AbsolutePosition + offset; | 1852 | copy.AbsolutePosition = copy.AbsolutePosition + offset; |
1853 | 1853 | ||
1854 | if (original.OwnerID != AgentID) | ||
1855 | { | ||
1856 | copy.SetOwnerId(AgentID); | ||
1857 | copy.SetRootPartOwner(copy.RootPart, AgentID, GroupID); | ||
1858 | |||
1859 | List<SceneObjectPart> partList = | ||
1860 | new List<SceneObjectPart>(copy.Children.Values); | ||
1861 | |||
1862 | if (m_parentScene.Permissions.PropagatePermissions()) | ||
1863 | { | ||
1864 | foreach (SceneObjectPart child in partList) | ||
1865 | { | ||
1866 | child.Inventory.ChangeInventoryOwner(AgentID); | ||
1867 | child.TriggerScriptChangedEvent(Changed.OWNER); | ||
1868 | child.ApplyNextOwnerPermissions(); | ||
1869 | } | ||
1870 | } | ||
1871 | |||
1872 | copy.RootPart.ObjectSaleType = 0; | ||
1873 | copy.RootPart.SalePrice = 10; | ||
1874 | } | ||
1875 | |||
1854 | Entities.Add(copy); | 1876 | Entities.Add(copy); |
1855 | 1877 | ||
1856 | // Since we copy from a source group that is in selected | 1878 | // Since we copy from a source group that is in selected |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 7081ced..c48ce3b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1700,7 +1700,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1700 | "[SCENE]: Storing {0}, {1} in {2}", | 1700 | "[SCENE]: Storing {0}, {1} in {2}", |
1701 | Name, UUID, m_scene.RegionInfo.RegionName); | 1701 | Name, UUID, m_scene.RegionInfo.RegionName); |
1702 | 1702 | ||
1703 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); | 1703 | SceneObjectGroup backup_group = Copy(false); |
1704 | backup_group.RootPart.Velocity = RootPart.Velocity; | 1704 | backup_group.RootPart.Velocity = RootPart.Velocity; |
1705 | backup_group.RootPart.Acceleration = RootPart.Acceleration; | 1705 | backup_group.RootPart.Acceleration = RootPart.Acceleration; |
1706 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; | 1706 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; |
@@ -1758,7 +1758,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1758 | /// Duplicates this object, including operations such as physics set up and attaching to the backup event. | 1758 | /// Duplicates this object, including operations such as physics set up and attaching to the backup event. |
1759 | /// </summary> | 1759 | /// </summary> |
1760 | /// <returns></returns> | 1760 | /// <returns></returns> |
1761 | public SceneObjectGroup Copy(UUID cAgentID, UUID cGroupID, bool userExposed) | 1761 | public SceneObjectGroup Copy(bool userExposed) |
1762 | { | 1762 | { |
1763 | SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); | 1763 | SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); |
1764 | dupe.m_isBackedUp = false; | 1764 | dupe.m_isBackedUp = false; |
@@ -1781,7 +1781,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1781 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); | 1781 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); |
1782 | 1782 | ||
1783 | if (!userExposed) | 1783 | if (!userExposed) |
1784 | { | ||
1784 | dupe.RootPart.IsAttachment = previousAttachmentStatus; | 1785 | dupe.RootPart.IsAttachment = previousAttachmentStatus; |
1786 | } | ||
1785 | 1787 | ||
1786 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 1788 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
1787 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; | 1789 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; |
@@ -1806,16 +1808,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1806 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); | 1808 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); |
1807 | } | 1809 | } |
1808 | 1810 | ||
1809 | // Now we've made a copy that replaces this one, we need to | ||
1810 | // switch the owner to the person who did the copying | ||
1811 | // Second Life copies an object and duplicates the first one in it's place | ||
1812 | // So, we have to make a copy of this one, set it in it's place then set the owner on this one | ||
1813 | if (userExposed) | ||
1814 | { | ||
1815 | SetRootPartOwner(m_rootPart, cAgentID, cGroupID); | ||
1816 | m_rootPart.ScheduleFullUpdate(); | ||
1817 | } | ||
1818 | |||
1819 | List<SceneObjectPart> partList; | 1811 | List<SceneObjectPart> partList; |
1820 | 1812 | ||
1821 | lockPartsForRead(true); | 1813 | lockPartsForRead(true); |
@@ -1837,12 +1829,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1837 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1829 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1838 | 1830 | ||
1839 | newPart.LinkNum = part.LinkNum; | 1831 | newPart.LinkNum = part.LinkNum; |
1840 | |||
1841 | if (userExposed) | ||
1842 | { | ||
1843 | SetPartOwner(newPart, cAgentID, cGroupID); | ||
1844 | newPart.ScheduleFullUpdate(); | ||
1845 | } | ||
1846 | } | 1832 | } |
1847 | } | 1833 | } |
1848 | 1834 | ||
@@ -3911,7 +3897,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3911 | 3897 | ||
3912 | public virtual ISceneObject CloneForNewScene() | 3898 | public virtual ISceneObject CloneForNewScene() |
3913 | { | 3899 | { |
3914 | SceneObjectGroup sog = Copy(this.OwnerID, this.GroupID, false); | 3900 | SceneObjectGroup sog = Copy(false); |
3915 | sog.m_isDeleted = false; | 3901 | sog.m_isDeleted = false; |
3916 | return sog; | 3902 | return sog; |
3917 | } | 3903 | } |
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 | |||
73 | public ContentManagementEntity(SceneObjectGroup Unchanged, bool physics) | 73 | public ContentManagementEntity(SceneObjectGroup Unchanged, bool physics) |
74 | : base(Unchanged, false) | 74 | : base(Unchanged, false) |
75 | { | 75 | { |
76 | m_UnchangedEntity = Unchanged.Copy(Unchanged.RootPart.OwnerID, Unchanged.RootPart.GroupID, false); | 76 | m_UnchangedEntity = Unchanged.Copy(false); |
77 | } | 77 | } |
78 | 78 | ||
79 | public ContentManagementEntity(string objectXML, Scene scene, bool physics) | 79 | 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 | |||
80 | /// </summary> | 80 | /// </summary> |
81 | public MetaEntity(SceneObjectGroup orig, bool physics) | 81 | public MetaEntity(SceneObjectGroup orig, bool physics) |
82 | { | 82 | { |
83 | m_Entity = orig.Copy(orig.RootPart.OwnerID, orig.RootPart.GroupID, false); | 83 | m_Entity = orig.Copy(false); |
84 | Initialize(physics); | 84 | Initialize(physics); |
85 | } | 85 | } |
86 | 86 | ||
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs index 9beeabb..2342bfa 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs | |||
@@ -675,7 +675,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
675 | m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity | 675 | m_dir.Z = vel_now.Z; // Preserve the accumulated falling velocity |
676 | 676 | ||
677 | d.Vector3 pos = d.BodyGetPosition(Body); | 677 | d.Vector3 pos = d.BodyGetPosition(Body); |
678 | 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); | 678 | // 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); |
679 | Vector3 posChange = new Vector3(); | 679 | Vector3 posChange = new Vector3(); |
680 | posChange.X = pos.X - m_lastPositionVector.X; | 680 | posChange.X = pos.X - m_lastPositionVector.X; |
681 | posChange.Y = pos.Y - m_lastPositionVector.Y; | 681 | posChange.Y = pos.Y - m_lastPositionVector.Y; |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index be7c348..2e39726 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -1576,19 +1576,19 @@ Console.WriteLine(" JointCreateFixed"); | |||
1576 | //Console.WriteLine("Move " + m_primName); | 1576 | //Console.WriteLine("Move " + m_primName); |
1577 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 | 1577 | if (!d.BodyIsEnabled (Body)) d.BodyEnable (Body); // KF add 161009 |
1578 | // NON-'VEHICLES' are dealt with here | 1578 | // NON-'VEHICLES' are dealt with here |
1579 | if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) | 1579 | // if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f)) |
1580 | { | 1580 | // { |
1581 | d.Vector3 avel2 = d.BodyGetAngularVel(Body); | 1581 | // d.Vector3 avel2 = d.BodyGetAngularVel(Body); |
1582 | /* | 1582 | // /* |
1583 | if (m_angularlock.X == 1) | 1583 | // if (m_angularlock.X == 1) |
1584 | avel2.X = 0; | 1584 | // avel2.X = 0; |
1585 | if (m_angularlock.Y == 1) | 1585 | // if (m_angularlock.Y == 1) |
1586 | avel2.Y = 0; | 1586 | // avel2.Y = 0; |
1587 | if (m_angularlock.Z == 1) | 1587 | // if (m_angularlock.Z == 1) |
1588 | avel2.Z = 0; | 1588 | // avel2.Z = 0; |
1589 | d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); | 1589 | // d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z); |
1590 | */ | 1590 | // */ |
1591 | } | 1591 | // } |
1592 | //float PID_P = 900.0f; | 1592 | //float PID_P = 900.0f; |
1593 | 1593 | ||
1594 | float m_mass = CalculateMass(); | 1594 | float m_mass = CalculateMass(); |