diff options
author | Justin Clark-Casey (justincc) | 2012-04-21 01:51:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-21 01:51:57 +0100 |
commit | d5c724e5b8cc15ce278b80070238e72a2e4ea0e8 (patch) | |
tree | 76cda579e96266004f6a4f59000329e83f2a23be /OpenSim/Region/Framework/Scenes | |
parent | Fix a bug where linking a non-physical prim with a physical prim as root woul... (diff) | |
download | opensim-SC_OLD-d5c724e5b8cc15ce278b80070238e72a2e4ea0e8.zip opensim-SC_OLD-d5c724e5b8cc15ce278b80070238e72a2e4ea0e8.tar.gz opensim-SC_OLD-d5c724e5b8cc15ce278b80070238e72a2e4ea0e8.tar.bz2 opensim-SC_OLD-d5c724e5b8cc15ce278b80070238e72a2e4ea0e8.tar.xz |
Add regression test for prim status when root prim in a new linkset is non-physical
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index d2cd37d..1592131 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1708,7 +1708,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1708 | { | 1708 | { |
1709 | if (ParentGroup.Scene == null) | 1709 | if (ParentGroup.Scene == null) |
1710 | return; | 1710 | return; |
1711 | 1711 | ||
1712 | if (!ParentGroup.Scene.PhysicalPrims && UsePhysics) | 1712 | if (!ParentGroup.Scene.PhysicalPrims && UsePhysics) |
1713 | return; | 1713 | return; |
1714 | 1714 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs index 91f4a34..8cdd645 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | |||
@@ -131,5 +131,24 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
131 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.Physics)); | 131 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.Physics)); |
132 | Assert.That(m_so1.Parts[1].Flags, Is.EqualTo(PrimFlags.Physics)); | 132 | Assert.That(m_so1.Parts[1].Flags, Is.EqualTo(PrimFlags.Physics)); |
133 | } | 133 | } |
134 | |||
135 | /// <summary> | ||
136 | /// Test that linking results in the correct physical status for all linkees. | ||
137 | /// </summary> | ||
138 | [Test] | ||
139 | public void TestLinkPhysicsChildPhysicalOnly() | ||
140 | { | ||
141 | TestHelpers.InMethod(); | ||
142 | |||
143 | m_scene.AddSceneObject(m_so1); | ||
144 | m_scene.AddSceneObject(m_so2); | ||
145 | |||
146 | m_so2.ScriptSetPhysicsStatus(true); | ||
147 | |||
148 | m_scene.LinkObjects(m_ownerId, m_so1.LocalId, new List<uint>() { m_so2.LocalId }); | ||
149 | |||
150 | Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None)); | ||
151 | Assert.That(m_so1.Parts[1].Flags, Is.EqualTo(PrimFlags.None)); | ||
152 | } | ||
134 | } | 153 | } |
135 | } \ No newline at end of file | 154 | } \ No newline at end of file |