mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user