aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-12-14 22:15:40 +0000
committerJustin Clark-Casey (justincc)2012-12-14 22:15:40 +0000
commit750ad2d3afd6fcf32a9e04794d860e117559a78f (patch)
treee3ab0ec5f87e34de931ee87db3bed08fccb111e5 /OpenSim/Region
parentminor: add some more detail to the logging if an LLClientView fails to proces... (diff)
downloadopensim-SC_OLD-750ad2d3afd6fcf32a9e04794d860e117559a78f.zip
opensim-SC_OLD-750ad2d3afd6fcf32a9e04794d860e117559a78f.tar.gz
opensim-SC_OLD-750ad2d3afd6fcf32a9e04794d860e117559a78f.tar.bz2
opensim-SC_OLD-750ad2d3afd6fcf32a9e04794d860e117559a78f.tar.xz
Fix issue where calling llVolumeDetect(FALSE) would not remove phantom flag, causing subsequent issues if physics was re-enabled.
Added regression tests Addresses http://opensimulator.org/mantis/view.php?id=6365
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs41
2 files changed, 42 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index f79ac96..ff67d6d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3993,13 +3993,14 @@ namespace OpenSim.Region.Framework.Scenes
3993 VolumeDetectActive = true; 3993 VolumeDetectActive = true;
3994 } 3994 }
3995 } 3995 }
3996 else 3996 else if (SetVD != wasVD)
3997 { 3997 {
3998 // Remove VolumeDetect in any case. Note, it's safe to call SetVolumeDetect as often as you like 3998 // Remove VolumeDetect in any case. Note, it's safe to call SetVolumeDetect as often as you like
3999 // (mumbles, well, at least if you have infinte CPU powers :-)) 3999 // (mumbles, well, at least if you have infinte CPU powers :-))
4000 if (pa != null) 4000 if (pa != null)
4001 pa.SetVolumeDetect(0); 4001 pa.SetVolumeDetect(0);
4002 4002
4003 RemFlag(PrimFlags.Phantom);
4003 VolumeDetectActive = false; 4004 VolumeDetectActive = false;
4004 } 4005 }
4005 4006
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
index 093cbd2..8eb3191 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs
@@ -78,6 +78,26 @@ namespace OpenSim.Region.Framework.Scenes.Tests
78 } 78 }
79 79
80 [Test] 80 [Test]
81 public void TestSetNonPhysicsVolumeDetectSinglePrim()
82 {
83 TestHelpers.InMethod();
84
85 m_scene.AddSceneObject(m_so1);
86
87 SceneObjectPart rootPart = m_so1.RootPart;
88 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
89
90 m_so1.ScriptSetVolumeDetect(true);
91
92// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags);
93 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom));
94
95 m_so1.ScriptSetVolumeDetect(false);
96
97 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
98 }
99
100 [Test]
81 public void TestSetPhysicsSinglePrim() 101 public void TestSetPhysicsSinglePrim()
82 { 102 {
83 TestHelpers.InMethod(); 103 TestHelpers.InMethod();
@@ -89,13 +109,32 @@ namespace OpenSim.Region.Framework.Scenes.Tests
89 109
90 m_so1.ScriptSetPhysicsStatus(true); 110 m_so1.ScriptSetPhysicsStatus(true);
91 111
92// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags);
93 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); 112 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
94 113
95 m_so1.ScriptSetPhysicsStatus(false); 114 m_so1.ScriptSetPhysicsStatus(false);
96 115
97 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); 116 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
98 } 117 }
118
119 [Test]
120 public void TestSetPhysicsVolumeDetectSinglePrim()
121 {
122 TestHelpers.InMethod();
123
124 m_scene.AddSceneObject(m_so1);
125
126 SceneObjectPart rootPart = m_so1.RootPart;
127 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
128
129 m_so1.ScriptSetPhysicsStatus(true);
130 m_so1.ScriptSetVolumeDetect(true);
131
132 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom | PrimFlags.Physics));
133
134 m_so1.ScriptSetVolumeDetect(false);
135
136 Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
137 }
99 138
100 [Test] 139 [Test]
101 public void TestSetPhysicsLinkset() 140 public void TestSetPhysicsLinkset()