From fa202a05e914395d5a1facf8bdadb6a553516bfe Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 6 Apr 2011 17:19:31 +0100
Subject: Add method doc to some land bitmap methods in ILandObject.
Also changes prim count tests to use the correct upper region bounds, though the method actually ignores the overage.
---
.../Region/CoreModules/World/Land/LandObject.cs | 14 +-----
.../World/Land/Tests/PrimCountModuleTests.cs | 52 +++++++++++++++++++---
2 files changed, 48 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index c4fb11e..c2f104e 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -701,23 +701,11 @@ namespace OpenSim.Region.CoreModules.World.Land
return LandBitmap;
}
- ///
- /// Full sim land object creation
- ///
- ///
public bool[,] BasicFullRegionLandBitmap()
{
return GetSquareLandBitmap(0, 0, (int) Constants.RegionSize, (int) Constants.RegionSize);
}
-
- ///
- /// Used to modify the bitmap between the x and y points. Points use 64 scale
- ///
- ///
- ///
- ///
- ///
- ///
+
public bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y)
{
bool[,] tempBitmap = new bool[64,64];
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index f006db2..4acba18 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -49,6 +49,10 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
protected UUID m_otherUserId = new UUID("99999999-9999-9999-9999-999999999999");
protected TestScene m_scene;
protected PrimCountModule m_pcm;
+
+ ///
+ /// A parcel that covers the entire sim.
+ ///
protected ILandObject m_lo;
[SetUp]
@@ -60,9 +64,9 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
SceneSetupHelpers.SetupSceneModules(m_scene, lmm, m_pcm);
ILandObject lo = new LandObject(m_userId, false, m_scene);
- lo.SetLandBitmap(lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
- m_lo = lmm.AddLandObject(lo);
- //scene.loadAllLandObjectsFromStorage(scene.RegionInfo.originRegionID);
+ lo.SetLandBitmap(
+ lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize / 4 - 1, (int)Constants.RegionSize / 4 - 1));
+ m_lo = lmm.AddLandObject(lo);
}
///
@@ -124,7 +128,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
/// Test count after a parcel owner owned copied object is added.
///
[Test]
- public void TestCopiedOwnerObject()
+ public void TestCopyOwnerObject()
{
TestHelper.InMethod();
// log4net.Config.XmlConfigurator.Configure();
@@ -143,7 +147,45 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pc.Users[m_userId], Is.EqualTo(6));
Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
Assert.That(pc.Simulator, Is.EqualTo(6));
- }
+ }
+
+ ///
+ /// Test that parcel counts update correctly when an object is moved between parcels, where that movement
+ /// is not done directly by the user/
+ ///
+ //[Test]
+ public void TestMoveOwnerObject()
+ {
+// TestHelper.InMethod();
+//// log4net.Config.XmlConfigurator.Configure();
+//
+// IPrimCounts pc = m_lo.PrimCounts;
+//
+// SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
+// m_scene.AddNewSceneObject(sog, false);
+//
+// Assert.That(pc.Owner, Is.EqualTo(3));
+// Assert.That(pc.Group, Is.EqualTo(0));
+// Assert.That(pc.Others, Is.EqualTo(0));
+// Assert.That(pc.Total, Is.EqualTo(3));
+// Assert.That(pc.Selected, Is.EqualTo(0));
+// Assert.That(pc.Users[m_userId], Is.EqualTo(3));
+// Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
+// Assert.That(pc.Simulator, Is.EqualTo(3));
+//
+// // Add a second object and retest
+// SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, 0x10);
+// m_scene.AddNewSceneObject(sog2, false);
+//
+// Assert.That(pc.Owner, Is.EqualTo(5));
+// Assert.That(pc.Group, Is.EqualTo(0));
+// Assert.That(pc.Others, Is.EqualTo(0));
+// Assert.That(pc.Total, Is.EqualTo(5));
+// Assert.That(pc.Selected, Is.EqualTo(0));
+// Assert.That(pc.Users[m_userId], Is.EqualTo(5));
+// Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
+// Assert.That(pc.Simulator, Is.EqualTo(5));
+ }
///
/// Test count after a parcel owner owned object is removed.
--
cgit v1.1
From 63533412f882fd55c0c40989d97f8a8262bc4e3c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 6 Apr 2011 18:57:50 +0100
Subject: Improve previous ILandObject method doc.
For test code, take a part name prefix when creating objects, so that these can be more easily identified in the logs
---
.../CoreModules/World/Land/LandManagementModule.cs | 12 +++
.../CoreModules/World/Land/PrimCountModule.cs | 22 +++--
.../World/Land/Tests/PrimCountModuleTests.cs | 102 ++++++++++++---------
3 files changed, 87 insertions(+), 49 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index abc7a3a..bfab7b8 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -612,6 +612,10 @@ namespace OpenSim.Region.CoreModules.World.Land
{
if (landBitmap[x, y])
{
+// m_log.DebugFormat(
+// "[LAND MANAGEMENT MODULE]: Registering parcel {0} for land co-ord ({1}, {2}) on {3}",
+// new_land.LandData.Name, x, y, m_scene.RegionInfo.RegionName);
+
m_landIDList[x, y] = newLandLocalID;
}
}
@@ -741,8 +745,16 @@ namespace OpenSim.Region.CoreModules.World.Land
// Corner case. If an autoreturn happens during sim startup
// we will come here with the list uninitialized
//
+ int landId = m_landIDList[x, y];
+
+// if (landId == 0)
+// m_log.DebugFormat(
+// "[LAND MANAGEMENT MODULE]: No land object found at ({0}, {1}) on {2}",
+// x, y, m_scene.RegionInfo.RegionName);
+
if (m_landList.ContainsKey(m_landIDList[x, y]))
return m_landList[m_landIDList[x, y]];
+
return null;
}
}
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
index 7a04eb1..dca842a 100644
--- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
@@ -173,24 +173,32 @@ namespace OpenSim.Region.CoreModules.World.Land
// NOTE: Call under Taint Lock
private void AddObject(SceneObjectGroup obj)
- {
-// m_log.DebugFormat("[PRIM COUNT MODULE]: Adding object {0} {1} to prim count", obj.Name, obj.UUID);
-
+ {
if (obj.IsAttachment)
return;
if (((obj.RootPart.Flags & PrimFlags.TemporaryOnRez) != 0))
- return;
+ return;
Vector3 pos = obj.AbsolutePosition;
ILandObject landObject = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y);
// If for some reason there is no land object (perhaps the object is out of bounds) then we can't count it
if (landObject == null)
+ {
+// m_log.WarnFormat(
+// "[PRIM COUNT MODULE]: Found no land object for {0} at position ({1}, {2}) on {3}",
+// obj.Name, pos.X, pos.Y, m_Scene.RegionInfo.RegionName);
+
return;
+ }
LandData landData = landObject.LandData;
// m_log.DebugFormat(
+// "[PRIM COUNT MODULE]: Adding object {0} with {1} parts to prim count for parcel {2} on {3}",
+// obj.Name, obj.Parts.Length, landData.Name, m_Scene.RegionInfo.RegionName);
+
+// m_log.DebugFormat(
// "[PRIM COUNT MODULE]: Object {0} is owned by {1} over land owned by {2}",
// obj.Name, obj.OwnerID, landData.OwnerID);
@@ -473,7 +481,9 @@ namespace OpenSim.Region.CoreModules.World.Land
m_OwnerMap[landData.GlobalID] = landData.OwnerID;
m_SimwideCounts[landData.OwnerID] = 0;
-// m_log.DebugFormat("[PRIM COUNT MODULE]: Adding parcel count for {0}", landData.GlobalID);
+// m_log.DebugFormat(
+// "[PRIM COUNT MODULE]: Initializing parcel count for {0} on {1}",
+// landData.Name, m_Scene.RegionInfo.RegionName);
m_ParcelCounts[landData.GlobalID] = new ParcelCounts();
}
@@ -583,4 +593,4 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
}
-}
+}
\ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index 4acba18..d161bb8 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -51,9 +51,14 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
protected PrimCountModule m_pcm;
///
- /// A parcel that covers the entire sim.
+ /// A parcel that covers the entire sim except for a 1 unit wide strip on the eastern side.
///
protected ILandObject m_lo;
+
+ ///
+ /// A parcel that covers just the eastern strip of the sim.
+ ///
+ protected ILandObject m_lo2;
[SetUp]
public void SetUp()
@@ -63,10 +68,19 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
m_scene = SceneSetupHelpers.SetupScene();
SceneSetupHelpers.SetupSceneModules(m_scene, lmm, m_pcm);
+ int xParcelDivider = (int)Constants.RegionSize - 1;
+
ILandObject lo = new LandObject(m_userId, false, m_scene);
+ lo.LandData.Name = "m_lo";
lo.SetLandBitmap(
- lo.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize / 4 - 1, (int)Constants.RegionSize / 4 - 1));
+ lo.GetSquareLandBitmap(0, 0, xParcelDivider, (int)Constants.RegionSize));
m_lo = lmm.AddLandObject(lo);
+
+ ILandObject lo2 = new LandObject(m_userId, false, m_scene);
+ lo2.SetLandBitmap(
+ lo2.GetSquareLandBitmap(xParcelDivider, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
+ lo2.LandData.Name = "m_lo2";
+ m_lo2 = lmm.AddLandObject(lo2);
}
///
@@ -98,7 +112,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts;
- SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
+ SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
m_scene.AddNewSceneObject(sog, false);
Assert.That(pc.Owner, Is.EqualTo(3));
@@ -111,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pc.Simulator, Is.EqualTo(3));
// Add a second object and retest
- SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, 0x10);
+ SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
m_scene.AddNewSceneObject(sog2, false);
Assert.That(pc.Owner, Is.EqualTo(5));
@@ -135,7 +149,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts;
- SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
+ SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
m_scene.AddNewSceneObject(sog, false);
m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity);
@@ -156,35 +170,37 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
//[Test]
public void TestMoveOwnerObject()
{
-// TestHelper.InMethod();
-//// log4net.Config.XmlConfigurator.Configure();
-//
-// IPrimCounts pc = m_lo.PrimCounts;
-//
-// SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
-// m_scene.AddNewSceneObject(sog, false);
-//
-// Assert.That(pc.Owner, Is.EqualTo(3));
-// Assert.That(pc.Group, Is.EqualTo(0));
-// Assert.That(pc.Others, Is.EqualTo(0));
-// Assert.That(pc.Total, Is.EqualTo(3));
-// Assert.That(pc.Selected, Is.EqualTo(0));
-// Assert.That(pc.Users[m_userId], Is.EqualTo(3));
-// Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
-// Assert.That(pc.Simulator, Is.EqualTo(3));
-//
-// // Add a second object and retest
-// SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, 0x10);
-// m_scene.AddNewSceneObject(sog2, false);
-//
-// Assert.That(pc.Owner, Is.EqualTo(5));
-// Assert.That(pc.Group, Is.EqualTo(0));
-// Assert.That(pc.Others, Is.EqualTo(0));
-// Assert.That(pc.Total, Is.EqualTo(5));
-// Assert.That(pc.Selected, Is.EqualTo(0));
-// Assert.That(pc.Users[m_userId], Is.EqualTo(5));
-// Assert.That(pc.Users[m_otherUserId], Is.EqualTo(0));
-// Assert.That(pc.Simulator, Is.EqualTo(5));
+ TestHelper.InMethod();
+ log4net.Config.XmlConfigurator.Configure();
+
+ SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
+ m_scene.AddNewSceneObject(sog, false);
+ SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
+ m_scene.AddNewSceneObject(sog2, false);
+
+ sog.AbsolutePosition = new Vector3(254, 2, 2);
+
+ IPrimCounts pclo1 = m_lo.PrimCounts;
+
+ Assert.That(pclo1.Owner, Is.EqualTo(2));
+ Assert.That(pclo1.Group, Is.EqualTo(0));
+ Assert.That(pclo1.Others, Is.EqualTo(0));
+ Assert.That(pclo1.Total, Is.EqualTo(2));
+ Assert.That(pclo1.Selected, Is.EqualTo(0));
+ Assert.That(pclo1.Users[m_userId], Is.EqualTo(2));
+ Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
+ Assert.That(pclo1.Simulator, Is.EqualTo(2));
+
+ IPrimCounts pclo2 = m_lo2.PrimCounts;
+
+ Assert.That(pclo2.Owner, Is.EqualTo(3));
+ Assert.That(pclo2.Group, Is.EqualTo(0));
+ Assert.That(pclo2.Others, Is.EqualTo(0));
+ Assert.That(pclo2.Total, Is.EqualTo(3));
+ Assert.That(pclo2.Selected, Is.EqualTo(0));
+ Assert.That(pclo2.Users[m_userId], Is.EqualTo(3));
+ Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
+ Assert.That(pclo2.Simulator, Is.EqualTo(3));
}
///
@@ -198,8 +214,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts;
- m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_userId, 0x1), false);
- SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x10);
+ m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_userId, "a", 0x1), false);
+ SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
m_scene.AddNewSceneObject(sogToDelete, false);
m_scene.DeleteSceneObject(sogToDelete, false);
@@ -223,7 +239,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts;
- SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, 0x01);
+ SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
sog.GroupID = m_groupId;
m_scene.AddNewSceneObject(sog, false);
@@ -254,11 +270,11 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts;
- SceneObjectGroup sogToKeep = SceneSetupHelpers.CreateSceneObject(1, m_userId, 0x1);
+ SceneObjectGroup sogToKeep = SceneSetupHelpers.CreateSceneObject(1, m_userId, "a", 0x1);
sogToKeep.GroupID = m_groupId;
m_scene.AddNewSceneObject(sogToKeep, false);
- SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x10);
+ SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_userId, "b", 0x10);
m_scene.AddNewSceneObject(sogToDelete, false);
m_scene.DeleteSceneObject(sogToDelete, false);
@@ -281,7 +297,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts;
- SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, 0x01);
+ SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "a", 0x01);
m_scene.AddNewSceneObject(sog, false);
Assert.That(pc.Owner, Is.EqualTo(0));
@@ -302,8 +318,8 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
IPrimCounts pc = m_lo.PrimCounts;
- m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_otherUserId, 0x1), false);
- SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, 0x10);
+ m_scene.AddNewSceneObject(SceneSetupHelpers.CreateSceneObject(1, m_otherUserId, "a", 0x1), false);
+ SceneObjectGroup sogToDelete = SceneSetupHelpers.CreateSceneObject(3, m_otherUserId, "b", 0x10);
m_scene.AddNewSceneObject(sogToDelete, false);
m_scene.DeleteSceneObject(sogToDelete, false);
@@ -326,7 +342,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
TestHelper.InMethod();
IPrimCounts pc = m_lo.PrimCounts;
- SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01);
+ SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
m_scene.AddNewSceneObject(sog, false);
m_pcm.TaintPrimCount();
--
cgit v1.1
From 8318915d7ec7ed3bd25ff1027a9a8dfb695f2609 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 6 Apr 2011 20:45:59 +0100
Subject: Signal prim count taint if the AbsolutePosition of a scene object
changes.
This updates prim counts correctly if an object is moved by something other than an avatar (e.g. scripts, region modules)
Create TestMoveOwnerObject() regression test for this case.
---
.../World/Land/Tests/PrimCountModuleTests.cs | 30 +++++++++++++++++++---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 2 ++
2 files changed, 28 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
index d161bb8..67b00ac 100644
--- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
+++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs
@@ -167,17 +167,18 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
/// Test that parcel counts update correctly when an object is moved between parcels, where that movement
/// is not done directly by the user/
///
- //[Test]
+ [Test]
public void TestMoveOwnerObject()
{
TestHelper.InMethod();
- log4net.Config.XmlConfigurator.Configure();
+// log4net.Config.XmlConfigurator.Configure();
SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, "a", 0x01);
m_scene.AddNewSceneObject(sog, false);
SceneObjectGroup sog2 = SceneSetupHelpers.CreateSceneObject(2, m_userId, "b", 0x10);
m_scene.AddNewSceneObject(sog2, false);
+ // Move the first scene object to the eastern strip parcel
sog.AbsolutePosition = new Vector3(254, 2, 2);
IPrimCounts pclo1 = m_lo.PrimCounts;
@@ -189,7 +190,7 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pclo1.Selected, Is.EqualTo(0));
Assert.That(pclo1.Users[m_userId], Is.EqualTo(2));
Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
- Assert.That(pclo1.Simulator, Is.EqualTo(2));
+ Assert.That(pclo1.Simulator, Is.EqualTo(5));
IPrimCounts pclo2 = m_lo2.PrimCounts;
@@ -200,7 +201,28 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests
Assert.That(pclo2.Selected, Is.EqualTo(0));
Assert.That(pclo2.Users[m_userId], Is.EqualTo(3));
Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
- Assert.That(pclo2.Simulator, Is.EqualTo(3));
+ Assert.That(pclo2.Simulator, Is.EqualTo(5));
+
+ // Now move it back again
+ sog.AbsolutePosition = new Vector3(2, 2, 2);
+
+ Assert.That(pclo1.Owner, Is.EqualTo(5));
+ Assert.That(pclo1.Group, Is.EqualTo(0));
+ Assert.That(pclo1.Others, Is.EqualTo(0));
+ Assert.That(pclo1.Total, Is.EqualTo(5));
+ Assert.That(pclo1.Selected, Is.EqualTo(0));
+ Assert.That(pclo1.Users[m_userId], Is.EqualTo(5));
+ Assert.That(pclo1.Users[m_otherUserId], Is.EqualTo(0));
+ Assert.That(pclo1.Simulator, Is.EqualTo(5));
+
+ Assert.That(pclo2.Owner, Is.EqualTo(0));
+ Assert.That(pclo2.Group, Is.EqualTo(0));
+ Assert.That(pclo2.Others, Is.EqualTo(0));
+ Assert.That(pclo2.Total, Is.EqualTo(0));
+ Assert.That(pclo2.Selected, Is.EqualTo(0));
+ Assert.That(pclo2.Users[m_userId], Is.EqualTo(0));
+ Assert.That(pclo2.Users[m_otherUserId], Is.EqualTo(0));
+ Assert.That(pclo2.Simulator, Is.EqualTo(5));
}
///
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index a7107f0..ca7d9d9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -325,6 +325,8 @@ namespace OpenSim.Region.Framework.Scenes
//m_rootPart.GroupPosition.Z);
//m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
//}
+
+ m_scene.EventManager.TriggerParcelPrimCountTainted();
}
}
--
cgit v1.1
From 9bc2705f37bfc057cdb74a4479d1c72fda4e0aa9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 6 Apr 2011 20:52:36 +0100
Subject: Fix bug where on duplication, the root part local id was continually
used in populating the local id scene object index instead of each part's
local id
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 60855b2..97af0a0 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1855,7 +1855,7 @@ namespace OpenSim.Region.Framework.Scenes
{
SceneObjectGroupsByLocalPartID[copy.LocalId] = copy;
foreach (SceneObjectPart part in children)
- SceneObjectGroupsByLocalPartID[copy.LocalId] = copy;
+ SceneObjectGroupsByLocalPartID[part.LocalId] = copy;
}
// PROBABLE END OF FIXME
--
cgit v1.1
From d31175060f8133c42c84da5b8e701ff1fb16eed8 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 8 Apr 2011 00:42:35 +0100
Subject: trivial whitespace removal to trigger a panda rebuild
---
OpenSim/Region/Application/Application.cs | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index d120f03..7e320e6 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -250,9 +250,7 @@ namespace OpenSim
m_saveCrashDumps = configSource.Configs["Startup"].GetBoolean("save_crashes", false);
// load Crash directory config
- m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);
-
-
+ m_crashDir = configSource.Configs["Startup"].GetString("crash_dir", m_crashDir);
if (background)
{
@@ -260,15 +258,9 @@ namespace OpenSim
m_sim.Startup();
}
else
- {
-
-
-
-
+ {
m_sim = new OpenSim(configSource);
-
-
-
+
m_sim.Startup();
while (true)
--
cgit v1.1