If an object has it's temporary flag unset after being set, put it back in the persistence list.

Effectively uses the patch in http://opensimulator.org/mantis/view.php?id=7060
But also adds a regression test and exposes the necessary property to allow this to work.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-03-22 00:29:13 +00:00
parent 178a5a5585
commit a5800f479e
2 changed files with 44 additions and 12 deletions

View File

@@ -57,6 +57,25 @@ namespace OpenSim.Region.Framework.Scenes.Tests
m_so2 = SceneHelpers.CreateSceneObject(1, m_ownerId, "so2", 0x20);
}
[Test]
public void TestSetTemporary()
{
TestHelpers.InMethod();
m_scene.AddSceneObject(m_so1);
m_so1.ScriptSetTemporaryStatus(true);
// Is this really the correct flag?
Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.TemporaryOnRez));
Assert.That(m_so1.Backup, Is.False);
// Test setting back to non-temporary
m_so1.ScriptSetTemporaryStatus(false);
Assert.That(m_so1.RootPart.Flags, Is.EqualTo(PrimFlags.None));
Assert.That(m_so1.Backup, Is.True);
}
[Test]
public void TestSetPhantomSinglePrim()
{