Reset Expire date for tempOnRez objects on rez. Fixes Mantis#2848
parent
5313330e4d
commit
fbd44e628c
|
@ -1089,6 +1089,12 @@ if (m_shape != null) {
|
||||||
|
|
||||||
#region Public Methods
|
#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)
|
public void AddFlag(PrimFlags flag)
|
||||||
{
|
{
|
||||||
// PrimFlags prevflag = Flags;
|
// PrimFlags prevflag = Flags;
|
||||||
|
@ -1098,7 +1104,7 @@ if (m_shape != null) {
|
||||||
_flags |= flag;
|
_flags |= flag;
|
||||||
|
|
||||||
if (flag == PrimFlags.TemporaryOnRez)
|
if (flag == PrimFlags.TemporaryOnRez)
|
||||||
Expires = DateTime.Now + new TimeSpan(600000000);
|
ResetExpire();
|
||||||
}
|
}
|
||||||
// System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
|
// System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
|
||||||
}
|
}
|
||||||
|
@ -1472,6 +1478,9 @@ if (m_shape != null) {
|
||||||
SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader);
|
SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader);
|
||||||
part.m_fromUserInventoryItemID = fromUserInventoryItemId;
|
part.m_fromUserInventoryItemID = fromUserInventoryItemId;
|
||||||
|
|
||||||
|
// for tempOnRez objects, we have to fix the Expire date.
|
||||||
|
if((part.Flags & PrimFlags.TemporaryOnRez) != 0) part.ResetExpire();
|
||||||
|
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue