diff options
author | Melanie | 2010-08-10 19:34:57 +0100 |
---|---|---|
committer | Melanie | 2010-08-10 19:34:57 +0100 |
commit | 75f92faeb4df65eaca9397a8b8370645bbb1018a (patch) | |
tree | 98a36c63a23bc7af569b06ff71a6630cf2e4ce9b /OpenSim | |
parent | Avoid truncation of error message during region creation. (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-75f92faeb4df65eaca9397a8b8370645bbb1018a.zip opensim-SC_OLD-75f92faeb4df65eaca9397a8b8370645bbb1018a.tar.gz opensim-SC_OLD-75f92faeb4df65eaca9397a8b8370645bbb1018a.tar.bz2 opensim-SC_OLD-75f92faeb4df65eaca9397a8b8370645bbb1018a.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Data/Migration.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs | 74 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 38 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 62 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | 42 | ||||
-rw-r--r-- | OpenSim/Services/GridService/HypergridLinker.cs | 25 |
8 files changed, 145 insertions, 114 deletions
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index c177097..86531d9 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs | |||
@@ -407,9 +407,8 @@ scan_old_style: | |||
407 | } | 407 | } |
408 | 408 | ||
409 | if (migrations.Count < 1) | 409 | if (migrations.Count < 1) |
410 | { | 410 | m_log.DebugFormat("[MIGRATIONS]: {0} data tables already up to date at revision {1}", _type, after); |
411 | m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type); | 411 | |
412 | } | ||
413 | return migrations; | 412 | return migrations; |
414 | } | 413 | } |
415 | } | 414 | } |
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 878b8e8..baa948e 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -210,6 +210,9 @@ namespace OpenSim.Data.MySQL | |||
210 | if (data.Data.ContainsKey("locY")) | 210 | if (data.Data.ContainsKey("locY")) |
211 | data.Data.Remove("locY"); | 211 | data.Data.Remove("locY"); |
212 | 212 | ||
213 | if (data.RegionName.Length > 32) | ||
214 | data.RegionName = data.RegionName.Substring(0, 32); | ||
215 | |||
213 | string[] fields = new List<string>(data.Data.Keys).ToArray(); | 216 | string[] fields = new List<string>(data.Data.Keys).ToArray(); |
214 | 217 | ||
215 | using (MySqlCommand cmd = new MySqlCommand()) | 218 | using (MySqlCommand cmd = new MySqlCommand()) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index df2690e..5473d23 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -4599,6 +4599,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4599 | } | 4599 | } |
4600 | } | 4600 | } |
4601 | 4601 | ||
4602 | // m_log.DebugFormat( | ||
4603 | // "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", | ||
4604 | // data.Name, update.FullID, flags, update.ID); | ||
4605 | |||
4602 | update.UpdateFlags = (uint)flags; | 4606 | update.UpdateFlags = (uint)flags; |
4603 | 4607 | ||
4604 | #endregion PrimFlags | 4608 | #endregion PrimFlags |
@@ -4731,7 +4735,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4731 | AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); | 4735 | AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); |
4732 | AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); | 4736 | AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); |
4733 | AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); | 4737 | AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); |
4734 | AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage); | 4738 | |
4739 | // Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once, | ||
4740 | // some clients will send out a separate ObjectImage packet for each face | ||
4741 | AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false); | ||
4742 | |||
4735 | AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); | 4743 | AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); |
4736 | AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); | 4744 | AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); |
4737 | AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); | 4745 | AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs index ebfba2b..e54ee02 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs | |||
@@ -57,9 +57,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
57 | config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); | 57 | config.Configs["Modules"].Set("GridServices", "LocalGridServicesConnector"); |
58 | config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); | 58 | config.Configs["GridService"].Set("LocalServiceModule", "OpenSim.Services.GridService.dll:GridService"); |
59 | config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); | 59 | config.Configs["GridService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); |
60 | config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion"); | 60 | config.Configs["GridService"].Set("Region_Test_Region_1", "DefaultRegion"); |
61 | config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion"); | 61 | config.Configs["GridService"].Set("Region_Test_Region_2", "FallbackRegion"); |
62 | config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion"); | 62 | config.Configs["GridService"].Set("Region_Test_Region_3", "FallbackRegion"); |
63 | config.Configs["GridService"].Set("Region_Other_Region_4", "FallbackRegion"); | 63 | config.Configs["GridService"].Set("Region_Other_Region_4", "FallbackRegion"); |
64 | 64 | ||
65 | m_LocalConnector = new LocalGridServicesConnector(config); | 65 | m_LocalConnector = new LocalGridServicesConnector(config); |
@@ -128,8 +128,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
128 | Assert.IsNotNull(result, "Retrieved GetRegionByName is null"); | 128 | Assert.IsNotNull(result, "Retrieved GetRegionByName is null"); |
129 | Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match"); | 129 | Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match"); |
130 | 130 | ||
131 | m_LocalConnector.RegisterRegion(UUID.Zero, r2); | 131 | m_LocalConnector.RegisterRegion(UUID.Zero, r2); |
132 | m_LocalConnector.RegisterRegion(UUID.Zero, r3); | 132 | m_LocalConnector.RegisterRegion(UUID.Zero, r3); |
133 | m_LocalConnector.RegisterRegion(UUID.Zero, r4); | 133 | m_LocalConnector.RegisterRegion(UUID.Zero, r4); |
134 | 134 | ||
135 | result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1)); | 135 | result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1)); |
@@ -154,38 +154,38 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests | |||
154 | Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null"); | 154 | Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null"); |
155 | Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected"); | 155 | Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected"); |
156 | 156 | ||
157 | results = m_LocalConnector.GetDefaultRegions(UUID.Zero); | 157 | results = m_LocalConnector.GetDefaultRegions(UUID.Zero); |
158 | Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null"); | 158 | Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null"); |
159 | Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size"); | 159 | Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size"); |
160 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match"); | 160 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match"); |
161 | 161 | ||
162 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY); | 162 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY); |
163 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null"); | 163 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null"); |
164 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size"); | 164 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size"); |
165 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); | 165 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); |
166 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); | 166 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); |
167 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); | 167 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3"); |
168 | 168 | ||
169 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY); | 169 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r2.RegionLocX, r2.RegionLocY); |
170 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null"); | 170 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 2 is null"); |
171 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size"); | 171 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 2 has not the expected size"); |
172 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3"); | 172 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 2-4-3"); |
173 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3"); | 173 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 2-4-3"); |
174 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3"); | 174 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 2-4-3"); |
175 | 175 | ||
176 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY); | 176 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r3.RegionLocX, r3.RegionLocY); |
177 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null"); | 177 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 3 is null"); |
178 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size"); | 178 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 3 has not the expected size"); |
179 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2"); | 179 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 3-4-2"); |
180 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2"); | 180 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 3-4-2"); |
181 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2"); | 181 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 3-4-2"); |
182 | 182 | ||
183 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY); | 183 | results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r4.RegionLocX, r4.RegionLocY); |
184 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null"); | 184 | Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 4 is null"); |
185 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size"); | 185 | Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 4 has not the expected size"); |
186 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2"); | 186 | Assert.That(results[0].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions are not in the expected order 4-3-2"); |
187 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2"); | 187 | Assert.That(results[1].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions are not in the expected order 4-3-2"); |
188 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2"); | 188 | Assert.That(results[2].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions are not in the expected order 4-3-2"); |
189 | 189 | ||
190 | results = m_LocalConnector.GetHyperlinks(UUID.Zero); | 190 | results = m_LocalConnector.GetHyperlinks(UUID.Zero); |
191 | Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null"); | 191 | Assert.IsNotNull(results, "Retrieved GetHyperlinks list is null"); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a2c3c07..6c1f3c2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1563,23 +1563,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1563 | if (userExposed) | 1563 | if (userExposed) |
1564 | dupe.m_rootPart.TrimPermissions(); | 1564 | dupe.m_rootPart.TrimPermissions(); |
1565 | 1565 | ||
1566 | /// may need to create a new Physics actor. | ||
1567 | if (dupe.RootPart.PhysActor != null && userExposed) | ||
1568 | { | ||
1569 | PrimitiveBaseShape pbs = dupe.RootPart.Shape; | ||
1570 | |||
1571 | dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape( | ||
1572 | dupe.RootPart.Name, | ||
1573 | pbs, | ||
1574 | dupe.RootPart.AbsolutePosition, | ||
1575 | dupe.RootPart.Scale, | ||
1576 | dupe.RootPart.RotationOffset, | ||
1577 | dupe.RootPart.PhysActor.IsPhysical); | ||
1578 | |||
1579 | dupe.RootPart.PhysActor.LocalID = dupe.RootPart.LocalId; | ||
1580 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); | ||
1581 | } | ||
1582 | |||
1583 | List<SceneObjectPart> partList; | 1566 | List<SceneObjectPart> partList; |
1584 | 1567 | ||
1585 | lock (m_parts) | 1568 | lock (m_parts) |
@@ -1598,11 +1581,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
1598 | if (part.UUID != m_rootPart.UUID) | 1581 | if (part.UUID != m_rootPart.UUID) |
1599 | { | 1582 | { |
1600 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1583 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1601 | |||
1602 | newPart.LinkNum = part.LinkNum; | 1584 | newPart.LinkNum = part.LinkNum; |
1603 | } | 1585 | } |
1604 | } | ||
1605 | 1586 | ||
1587 | // Need to duplicate the physics actor as well | ||
1588 | if (part.PhysActor != null && userExposed) | ||
1589 | { | ||
1590 | PrimitiveBaseShape pbs = part.Shape; | ||
1591 | |||
1592 | part.PhysActor | ||
1593 | = m_scene.PhysicsScene.AddPrimShape( | ||
1594 | part.Name, | ||
1595 | pbs, | ||
1596 | part.AbsolutePosition, | ||
1597 | part.Scale, | ||
1598 | part.RotationOffset, | ||
1599 | part.PhysActor.IsPhysical); | ||
1600 | |||
1601 | part.PhysActor.LocalID = part.LocalId; | ||
1602 | part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); | ||
1603 | } | ||
1604 | } | ||
1605 | |||
1606 | if (userExposed) | 1606 | if (userExposed) |
1607 | { | 1607 | { |
1608 | dupe.UpdateParentIDs(); | 1608 | dupe.UpdateParentIDs(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0c35eec..cf718cb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -150,8 +150,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
150 | // TODO: This needs to be persisted in next XML version update! | 150 | // TODO: This needs to be persisted in next XML version update! |
151 | [XmlIgnore] | 151 | [XmlIgnore] |
152 | public readonly int[] PayPrice = {-2,-2,-2,-2,-2}; | 152 | public readonly int[] PayPrice = {-2,-2,-2,-2,-2}; |
153 | |||
153 | [XmlIgnore] | 154 | [XmlIgnore] |
154 | public PhysicsActor PhysActor; | 155 | public PhysicsActor PhysActor |
156 | { | ||
157 | get { return m_physActor; } | ||
158 | set | ||
159 | { | ||
160 | // m_log.DebugFormat("[SOP]: PhysActor set to {0} for {1} {2}", value, Name, UUID); | ||
161 | m_physActor = value; | ||
162 | } | ||
163 | } | ||
155 | 164 | ||
156 | //Xantor 20080528 Sound stuff: | 165 | //Xantor 20080528 Sound stuff: |
157 | // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. | 166 | // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. |
@@ -297,6 +306,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
297 | /// </summary> | 306 | /// </summary> |
298 | private byte m_updateFlag; | 307 | private byte m_updateFlag; |
299 | 308 | ||
309 | private PhysicsActor m_physActor; | ||
300 | protected Vector3 m_acceleration; | 310 | protected Vector3 m_acceleration; |
301 | protected Vector3 m_angularVelocity; | 311 | protected Vector3 m_angularVelocity; |
302 | 312 | ||
@@ -396,7 +406,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
396 | // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from | 406 | // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from |
397 | // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log | 407 | // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log |
398 | 408 | ||
399 | _flags = 0; | 409 | Flags = 0; |
400 | CreateSelected = true; | 410 | CreateSelected = true; |
401 | 411 | ||
402 | TrimPermissions(); | 412 | TrimPermissions(); |
@@ -424,7 +434,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
424 | private uint _groupMask = (uint)PermissionMask.None; | 434 | private uint _groupMask = (uint)PermissionMask.None; |
425 | private uint _everyoneMask = (uint)PermissionMask.None; | 435 | private uint _everyoneMask = (uint)PermissionMask.None; |
426 | private uint _nextOwnerMask = (uint)PermissionMask.All; | 436 | private uint _nextOwnerMask = (uint)PermissionMask.All; |
427 | private PrimFlags _flags = 0; | 437 | private PrimFlags _flags = PrimFlags.None; |
428 | private DateTime m_expires; | 438 | private DateTime m_expires; |
429 | private DateTime m_rezzed; | 439 | private DateTime m_rezzed; |
430 | private bool m_createSelected = false; | 440 | private bool m_createSelected = false; |
@@ -471,10 +481,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
471 | set { m_inventory.Items = value; } | 481 | set { m_inventory.Items = value; } |
472 | } | 482 | } |
473 | 483 | ||
484 | /// <summary> | ||
485 | /// This is idential to the Flags property, except that the returned value is uint rather than PrimFlags | ||
486 | /// </summary> | ||
487 | [Obsolete("Use Flags property instead")] | ||
474 | public uint ObjectFlags | 488 | public uint ObjectFlags |
475 | { | 489 | { |
476 | get { return (uint)_flags; } | 490 | get { return (uint)Flags; } |
477 | set { _flags = (PrimFlags)value; } | 491 | set { Flags = (PrimFlags)value; } |
478 | } | 492 | } |
479 | 493 | ||
480 | public UUID UUID | 494 | public UUID UUID |
@@ -1002,7 +1016,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1002 | public bool CreateSelected | 1016 | public bool CreateSelected |
1003 | { | 1017 | { |
1004 | get { return m_createSelected; } | 1018 | get { return m_createSelected; } |
1005 | set { m_createSelected = value; } | 1019 | set |
1020 | { | ||
1021 | // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); | ||
1022 | m_createSelected = value; | ||
1023 | } | ||
1006 | } | 1024 | } |
1007 | 1025 | ||
1008 | #endregion | 1026 | #endregion |
@@ -1169,7 +1187,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1169 | public PrimFlags Flags | 1187 | public PrimFlags Flags |
1170 | { | 1188 | { |
1171 | get { return _flags; } | 1189 | get { return _flags; } |
1172 | set { _flags = value; } | 1190 | set |
1191 | { | ||
1192 | // m_log.DebugFormat("[SOP]: Setting flags for {0} {1} to {2}", UUID, Name, value); | ||
1193 | _flags = value; | ||
1194 | } | ||
1173 | } | 1195 | } |
1174 | 1196 | ||
1175 | [XmlIgnore] | 1197 | [XmlIgnore] |
@@ -1305,7 +1327,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1305 | if ((ObjectFlags & (uint) flag) == 0) | 1327 | if ((ObjectFlags & (uint) flag) == 0) |
1306 | { | 1328 | { |
1307 | //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); | 1329 | //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); |
1308 | _flags |= flag; | 1330 | Flags |= flag; |
1309 | 1331 | ||
1310 | if (flag == PrimFlags.TemporaryOnRez) | 1332 | if (flag == PrimFlags.TemporaryOnRez) |
1311 | ResetExpire(); | 1333 | ResetExpire(); |
@@ -1523,7 +1545,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1523 | } | 1545 | } |
1524 | else | 1546 | else |
1525 | { | 1547 | { |
1526 | m_log.DebugFormat("[SPEW]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); | 1548 | m_log.DebugFormat("[SOP]: physics actor is null for {0} with parent {1}", UUID, this.ParentGroup.UUID); |
1527 | } | 1549 | } |
1528 | } | 1550 | } |
1529 | } | 1551 | } |
@@ -1793,7 +1815,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1793 | /// that's not wholesome. Had to make Scene public | 1815 | /// that's not wholesome. Had to make Scene public |
1794 | //PhysActor = null; | 1816 | //PhysActor = null; |
1795 | 1817 | ||
1796 | if ((ObjectFlags & (uint)PrimFlags.Phantom) == 0) | 1818 | if ((Flags & PrimFlags.Phantom) == 0) |
1797 | { | 1819 | { |
1798 | if (UsePhysics) | 1820 | if (UsePhysics) |
1799 | { | 1821 | { |
@@ -1940,12 +1962,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1940 | } | 1962 | } |
1941 | 1963 | ||
1942 | public uint GetEffectiveObjectFlags() | 1964 | public uint GetEffectiveObjectFlags() |
1943 | { | 1965 | { |
1944 | PrimFlags f = _flags; | 1966 | // Commenting this section of code out since it doesn't actually do anything, as enums are handled by |
1945 | if (m_parentGroup == null || m_parentGroup.RootPart == this) | 1967 | // value rather than reference |
1946 | f &= ~(PrimFlags.Touch | PrimFlags.Money); | 1968 | // PrimFlags f = _flags; |
1969 | // if (m_parentGroup == null || m_parentGroup.RootPart == this) | ||
1970 | // f &= ~(PrimFlags.Touch | PrimFlags.Money); | ||
1947 | 1971 | ||
1948 | return (uint)_flags | (uint)LocalFlags; | 1972 | return (uint)Flags | (uint)LocalFlags; |
1949 | } | 1973 | } |
1950 | 1974 | ||
1951 | public Vector3 GetGeometricCenter() | 1975 | public Vector3 GetGeometricCenter() |
@@ -2696,10 +2720,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2696 | public void RemFlag(PrimFlags flag) | 2720 | public void RemFlag(PrimFlags flag) |
2697 | { | 2721 | { |
2698 | // PrimFlags prevflag = Flags; | 2722 | // PrimFlags prevflag = Flags; |
2699 | if ((ObjectFlags & (uint) flag) != 0) | 2723 | if ((Flags & flag) != 0) |
2700 | { | 2724 | { |
2701 | //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString()); | 2725 | //m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString()); |
2702 | _flags &= ~flag; | 2726 | Flags &= ~flag; |
2703 | } | 2727 | } |
2704 | //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); | 2728 | //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); |
2705 | //ScheduleFullUpdate(); | 2729 | //ScheduleFullUpdate(); |
@@ -2990,10 +3014,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2990 | 3014 | ||
2991 | if (remoteClient.AgentId == _ownerID) | 3015 | if (remoteClient.AgentId == _ownerID) |
2992 | { | 3016 | { |
2993 | if ((uint) (_flags & PrimFlags.CreateSelected) != 0) | 3017 | if ((Flags & PrimFlags.CreateSelected) != 0) |
2994 | { | 3018 | { |
2995 | clientFlags |= (uint) PrimFlags.CreateSelected; | 3019 | clientFlags |= (uint) PrimFlags.CreateSelected; |
2996 | _flags &= ~PrimFlags.CreateSelected; | 3020 | Flags &= ~PrimFlags.CreateSelected; |
2997 | } | 3021 | } |
2998 | } | 3022 | } |
2999 | //bool isattachment = IsAttachment; | 3023 | //bool isattachment = IsAttachment; |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index 8a103d7..c9662ef 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -48,24 +48,42 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
48 | TestHelper.InMethod(); | 48 | TestHelper.InMethod(); |
49 | Scene scene = SceneSetupHelpers.SetupScene(); | 49 | Scene scene = SceneSetupHelpers.SetupScene(); |
50 | 50 | ||
51 | UUID ownerUuid = new UUID("00000000-0000-0000-0000-000000000010"); | 51 | UUID ownerId = new UUID("00000000-0000-0000-0000-000000000010"); |
52 | string objName = "obj1"; | 52 | string part1Name = "part1"; |
53 | UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 53 | UUID part1Id = new UUID("00000000-0000-0000-0000-000000000001"); |
54 | string part2Name = "part2"; | ||
55 | UUID part2Id = new UUID("00000000-0000-0000-0000-000000000002"); | ||
54 | 56 | ||
55 | SceneObjectPart part | 57 | SceneObjectPart part1 |
56 | = new SceneObjectPart(ownerUuid, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 58 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
57 | { Name = objName, UUID = objUuid }; | 59 | { Name = part1Name, UUID = part1Id }; |
60 | SceneObjectGroup so = new SceneObjectGroup(part1); | ||
61 | SceneObjectPart part2 | ||
62 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | ||
63 | { Name = part2Name, UUID = part2Id }; | ||
64 | so.AddPart(part2); | ||
58 | 65 | ||
59 | scene.AddNewSceneObject(new SceneObjectGroup(part), false); | 66 | scene.AddNewSceneObject(so, false); |
60 | 67 | ||
61 | SceneObjectGroup duplicatedSo | 68 | SceneObjectGroup dupeSo |
62 | = scene.SceneGraph.DuplicateObject( | 69 | = scene.SceneGraph.DuplicateObject( |
63 | part.LocalId, new Vector3(10, 0, 0), 0, ownerUuid, UUID.Zero, Quaternion.Identity); | 70 | part1.LocalId, new Vector3(10, 0, 0), 0, ownerId, UUID.Zero, Quaternion.Identity); |
71 | Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); | ||
64 | 72 | ||
65 | Assert.That(duplicatedSo.Children.Count, Is.EqualTo(1)); | 73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); |
66 | Assert.That(duplicatedSo.RootPart.LocalId, Is.Not.EqualTo(part.LocalId)); | 74 | SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); |
75 | Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); | ||
76 | Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); | ||
67 | 77 | ||
68 | //SceneObjectPart retrievedPart = scene.GetSceneObjectPart(objUuid); | 78 | Assert.That(dupePart1.Flags, Is.EqualTo(part1.Flags)); |
79 | Assert.That(dupePart2.Flags, Is.EqualTo(part2.Flags)); | ||
80 | |||
81 | /* | ||
82 | Assert.That(part1.PhysActor, Is.Not.Null); | ||
83 | Assert.That(part2.PhysActor, Is.Not.Null); | ||
84 | Assert.That(dupePart1.PhysActor, Is.Not.Null); | ||
85 | Assert.That(dupePart2.PhysActor, Is.Not.Null); | ||
86 | */ | ||
69 | } | 87 | } |
70 | } | 88 | } |
71 | } \ No newline at end of file | 89 | } \ No newline at end of file |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index b190f93..3d722ec 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -247,21 +247,8 @@ namespace OpenSim.Services.GridService | |||
247 | } | 247 | } |
248 | 248 | ||
249 | regInfo.RegionID = regionID; | 249 | regInfo.RegionID = regionID; |
250 | Uri uri = null; | 250 | if (regInfo.RegionName == string.Empty) |
251 | try | 251 | regInfo.RegionName = regInfo.ExternalHostName; |
252 | { | ||
253 | uri = new Uri(externalName); | ||
254 | regInfo.ExternalHostName = uri.Host; | ||
255 | regInfo.HttpPort = (uint)uri.Port; | ||
256 | } | ||
257 | catch | ||
258 | { | ||
259 | m_log.WarnFormat("[HYPERGRID LINKER]: Remote Gatekeeper at {0} provided malformed ExternalName {1}", regInfo.ExternalHostName, externalName); | ||
260 | } | ||
261 | string name = regInfo.RegionName; | ||
262 | regInfo.RegionName = regInfo.ExternalHostName + ":" + regInfo.HttpPort; | ||
263 | if (name != string.Empty) | ||
264 | regInfo.RegionName += ":" + name; | ||
265 | 252 | ||
266 | // Try get the map image | 253 | // Try get the map image |
267 | //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); | 254 | //regInfo.TerrainImage = m_GatekeeperConnector.GetMapImage(regionID, imageURL); |
@@ -384,8 +371,6 @@ namespace OpenSim.Services.GridService | |||
384 | 371 | ||
385 | private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) | 372 | private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) |
386 | { | 373 | { |
387 | //m_HyperlinkRegions[regionInfo.RegionID] = regionInfo; | ||
388 | //m_HyperlinkHandles[regionInfo.RegionID] = regionHandle; | ||
389 | 374 | ||
390 | RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); | 375 | RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); |
391 | int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline; | 376 | int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline; |
@@ -397,12 +382,6 @@ namespace OpenSim.Services.GridService | |||
397 | 382 | ||
398 | private void RemoveHyperlinkRegion(UUID regionID) | 383 | private void RemoveHyperlinkRegion(UUID regionID) |
399 | { | 384 | { |
400 | //// Try the hyperlink collection | ||
401 | //if (m_HyperlinkRegions.ContainsKey(regionID)) | ||
402 | //{ | ||
403 | // m_HyperlinkRegions.Remove(regionID); | ||
404 | // m_HyperlinkHandles.Remove(regionID); | ||
405 | //} | ||
406 | m_Database.Delete(regionID); | 385 | m_Database.Delete(regionID); |
407 | } | 386 | } |
408 | 387 | ||