diff options
author | Justin Clark-Casey (justincc) | 2011-03-26 02:05:53 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-26 02:05:53 +0000 |
commit | bfd9cc44b40e64af3c7504d43a15b7e1b44070a0 (patch) | |
tree | 25776df2f787778fa42b2959430e6e4c211f638b /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into primcounts (diff) | |
download | opensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.zip opensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.tar.gz opensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.tar.bz2 opensim-SC_OLD-bfd9cc44b40e64af3c7504d43a15b7e1b44070a0.tar.xz |
When an object is duplicated, add the dupe to the uuid/local id indexes as well as the basic entities list.
Added a prim counts test to reinforce this - shift-copy was no incrementing prim count. This will sometime become a basic scene test.
New code needs to be refactored so we just call SceneGraph.AddSceneObject(). This will happen in the near future.
With this, basic owner prim counts on a single parcel appear to be working fine (with the same previous existing taint calls as used by the land management module).
More work to do.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index 80b2859..dd55f98 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -105,6 +105,29 @@ namespace OpenSim.Region.CoreModules.World.Land.Tests | |||
105 | } | 105 | } |
106 | 106 | ||
107 | /// <summary> | 107 | /// <summary> |
108 | /// Test count after a parcel owner owned copied object is added. | ||
109 | /// </summary> | ||
110 | [Test] | ||
111 | public void TestCopiedOwnerObject() | ||
112 | { | ||
113 | TestHelper.InMethod(); | ||
114 | // log4net.Config.XmlConfigurator.Configure(); | ||
115 | |||
116 | IPrimCounts pc = m_lo.PrimCounts; | ||
117 | |||
118 | SceneObjectGroup sog = SceneSetupHelpers.CreateSceneObject(3, m_userId, 0x01); | ||
119 | m_scene.AddNewSceneObject(sog, false); | ||
120 | m_scene.SceneGraph.DuplicateObject(sog.LocalId, Vector3.Zero, 0, m_userId, UUID.Zero, Quaternion.Identity); | ||
121 | |||
122 | Assert.That(pc.Owner, Is.EqualTo(6)); | ||
123 | Assert.That(pc.Group, Is.EqualTo(0)); | ||
124 | Assert.That(pc.Others, Is.EqualTo(0)); | ||
125 | Assert.That(pc.Users[m_userId], Is.EqualTo(6)); | ||
126 | Assert.That(pc.Users[m_dummyUserId], Is.EqualTo(0)); | ||
127 | Assert.That(pc.Simulator, Is.EqualTo(6)); | ||
128 | } | ||
129 | |||
130 | /// <summary> | ||
108 | /// Test count after a parcel owner owned object is removed. | 131 | /// Test count after a parcel owner owned object is removed. |
109 | /// </summary> | 132 | /// </summary> |
110 | [Test] | 133 | [Test] |