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=63650.7.4-extended
parent
6693ef8288
commit
150c4faa79
|
@ -4091,13 +4091,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
VolumeDetectActive = true;
|
VolumeDetectActive = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (SetVD != wasVD)
|
||||||
{
|
{
|
||||||
// Remove VolumeDetect in any case. Note, it's safe to call SetVolumeDetect as often as you like
|
// Remove VolumeDetect in any case. Note, it's safe to call SetVolumeDetect as often as you like
|
||||||
// (mumbles, well, at least if you have infinte CPU powers :-))
|
// (mumbles, well, at least if you have infinte CPU powers :-))
|
||||||
if (pa != null)
|
if (pa != null)
|
||||||
pa.SetVolumeDetect(0);
|
pa.SetVolumeDetect(0);
|
||||||
|
|
||||||
|
RemFlag(PrimFlags.Phantom);
|
||||||
VolumeDetectActive = false;
|
VolumeDetectActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,26 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestSetNonPhysicsVolumeDetectSinglePrim()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
|
||||||
|
m_scene.AddSceneObject(m_so1);
|
||||||
|
|
||||||
|
SceneObjectPart rootPart = m_so1.RootPart;
|
||||||
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
|
||||||
|
|
||||||
|
m_so1.ScriptSetVolumeDetect(true);
|
||||||
|
|
||||||
|
// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags);
|
||||||
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom));
|
||||||
|
|
||||||
|
m_so1.ScriptSetVolumeDetect(false);
|
||||||
|
|
||||||
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestSetPhysicsSinglePrim()
|
public void TestSetPhysicsSinglePrim()
|
||||||
{
|
{
|
||||||
|
@ -89,7 +109,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
|
|
||||||
m_so1.ScriptSetPhysicsStatus(true);
|
m_so1.ScriptSetPhysicsStatus(true);
|
||||||
|
|
||||||
// Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags);
|
|
||||||
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
|
||||||
|
|
||||||
m_so1.ScriptSetPhysicsStatus(false);
|
m_so1.ScriptSetPhysicsStatus(false);
|
||||||
|
@ -97,6 +116,26 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
||||||
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestSetPhysicsVolumeDetectSinglePrim()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
|
||||||
|
m_scene.AddSceneObject(m_so1);
|
||||||
|
|
||||||
|
SceneObjectPart rootPart = m_so1.RootPart;
|
||||||
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None));
|
||||||
|
|
||||||
|
m_so1.ScriptSetPhysicsStatus(true);
|
||||||
|
m_so1.ScriptSetVolumeDetect(true);
|
||||||
|
|
||||||
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom | PrimFlags.Physics));
|
||||||
|
|
||||||
|
m_so1.ScriptSetVolumeDetect(false);
|
||||||
|
|
||||||
|
Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestSetPhysicsLinkset()
|
public void TestSetPhysicsLinkset()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue