Implement temp-on-rez objecte really being temporary

This commit is contained in:
Melanie Thielker
2008-10-03 15:32:44 +00:00
parent fbc813e658
commit 3902149e1b
3 changed files with 49 additions and 6 deletions

View File

@@ -361,6 +361,7 @@ namespace OpenSim.Region.Environment.Scenes
private uint _everyoneMask = (uint)PermissionMask.None;
private uint _nextOwnerMask = (uint)PermissionMask.All;
private PrimFlags _flags = 0;
private DateTime m_expires;
public UUID CreatorID {
get
@@ -451,6 +452,13 @@ namespace OpenSim.Region.Environment.Scenes
set { m_particleSystem = value; }
}
[XmlIgnore]
public DateTime Expires
{
get { return m_expires; }
set { m_expires = value; }
}
/// <summary>
/// The position of the entire group that this prim belongs to.
/// </summary>
@@ -1050,15 +1058,15 @@ namespace OpenSim.Region.Environment.Scenes
public void AddFlag(PrimFlags flag)
{
// PrimFlags prevflag = Flags;
//uint objflags = Flags;
if ((ObjectFlags & (uint) flag) == 0)
{
//Console.WriteLine("Adding flag: " + ((PrimFlags) flag).ToString());
_flags |= flag;
if (flag == PrimFlags.TemporaryOnRez)
Expires = DateTime.Now + new TimeSpan(600000000);
}
//uint currflag = (uint)Flags;
//System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
//ScheduleFullUpdate();
// System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
}
/// <summary>