aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorHomer Horwitz2008-12-19 18:38:45 +0000
committerHomer Horwitz2008-12-19 18:38:45 +0000
commitfbd44e628ce5c931918870776a35619dd97c2a7e (patch)
tree4639651d9c8b95edc269e7965902ac4c64a3a1c0 /OpenSim/Region
parent* minor: move IGesturesModule into the correct namespace (diff)
downloadopensim-SC-fbd44e628ce5c931918870776a35619dd97c2a7e.zip
opensim-SC-fbd44e628ce5c931918870776a35619dd97c2a7e.tar.gz
opensim-SC-fbd44e628ce5c931918870776a35619dd97c2a7e.tar.bz2
opensim-SC-fbd44e628ce5c931918870776a35619dd97c2a7e.tar.xz
Reset Expire date for tempOnRez objects on rez. Fixes Mantis#2848
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 3fd3444..c2664b9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1089,6 +1089,12 @@ if (m_shape != null) {
1089 1089
1090 #region Public Methods 1090 #region Public Methods
1091 1091
1092 public void ResetExpire()
1093 {
1094 Expires = DateTime.Now + new TimeSpan(600000000);
1095 m_log.DebugFormat("[SOP]: Reset Expire to {0}", Expires);
1096 }
1097
1092 public void AddFlag(PrimFlags flag) 1098 public void AddFlag(PrimFlags flag)
1093 { 1099 {
1094 // PrimFlags prevflag = Flags; 1100 // PrimFlags prevflag = Flags;
@@ -1098,7 +1104,7 @@ if (m_shape != null) {
1098 _flags |= flag; 1104 _flags |= flag;
1099 1105
1100 if (flag == PrimFlags.TemporaryOnRez) 1106 if (flag == PrimFlags.TemporaryOnRez)
1101 Expires = DateTime.Now + new TimeSpan(600000000); 1107 ResetExpire();
1102 } 1108 }
1103 // System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 1109 // System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
1104 } 1110 }
@@ -1459,7 +1465,7 @@ if (m_shape != null) {
1459 { 1465 {
1460 return FromXml(UUID.Zero, xmlReader); 1466 return FromXml(UUID.Zero, xmlReader);
1461 } 1467 }
1462 1468
1463 /// <summary> 1469 /// <summary>
1464 /// Restore this part from the serialized xml representation. 1470 /// Restore this part from the serialized xml representation.
1465 /// </summary> 1471 /// </summary>
@@ -1471,9 +1477,12 @@ if (m_shape != null) {
1471 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); 1477 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
1472 SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader); 1478 SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader);
1473 part.m_fromUserInventoryItemID = fromUserInventoryItemId; 1479 part.m_fromUserInventoryItemID = fromUserInventoryItemId;
1474 1480
1481 // for tempOnRez objects, we have to fix the Expire date.
1482 if((part.Flags & PrimFlags.TemporaryOnRez) != 0) part.ResetExpire();
1483
1475 return part; 1484 return part;
1476 } 1485 }
1477 1486
1478 public UUID GetAvatarOnSitTarget() 1487 public UUID GetAvatarOnSitTarget()
1479 { 1488 {