Reset Expire date for tempOnRez objects on rez. Fixes Mantis#2848

0.6.1-post-fixes
Homer Horwitz 2008-12-19 18:38:45 +00:00
parent 5313330e4d
commit fbd44e628c
1 changed files with 13 additions and 4 deletions

View File

@ -1089,6 +1089,12 @@ if (m_shape != null) {
#region Public Methods
public void ResetExpire()
{
Expires = DateTime.Now + new TimeSpan(600000000);
m_log.DebugFormat("[SOP]: Reset Expire to {0}", Expires);
}
public void AddFlag(PrimFlags flag)
{
// PrimFlags prevflag = Flags;
@ -1098,7 +1104,7 @@ if (m_shape != null) {
_flags |= flag;
if (flag == PrimFlags.TemporaryOnRez)
Expires = DateTime.Now + new TimeSpan(600000000);
ResetExpire();
}
// System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
}
@ -1472,6 +1478,9 @@ if (m_shape != null) {
SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader);
part.m_fromUserInventoryItemID = fromUserInventoryItemId;
// for tempOnRez objects, we have to fix the Expire date.
if((part.Flags & PrimFlags.TemporaryOnRez) != 0) part.ResetExpire();
return part;
}