aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2010-10-18 20:30:46 +0100
committerMelanie2010-10-18 20:30:46 +0100
commitbb7a755cba628a24bb339ed0aa974ac0ee5503d1 (patch)
treeb1c7fd32711dd46b7080643c6a6900f3fe827cce /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentAlphabetize results on region search by prefix matching (diff)
downloadopensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.zip
opensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.tar.gz
opensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.tar.bz2
opensim-SC-bb7a755cba628a24bb339ed0aa974ac0ee5503d1.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs127
1 files changed, 68 insertions, 59 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index f0740f8..7ec3697 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -39,6 +39,7 @@ using OpenMetaverse.Packets;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Region.Framework.Interfaces; 40using OpenSim.Region.Framework.Interfaces;
41using OpenSim.Region.Framework.Scenes.Scripting; 41using OpenSim.Region.Framework.Scenes.Scripting;
42using OpenSim.Region.Framework.Scenes.Serialization;
42using OpenSim.Region.Physics.Manager; 43using OpenSim.Region.Physics.Manager;
43 44
44namespace OpenSim.Region.Framework.Scenes 45namespace OpenSim.Region.Framework.Scenes
@@ -119,33 +120,29 @@ namespace OpenSim.Region.Framework.Scenes
119 /// <value> 120 /// <value>
120 /// Is this sop a root part? 121 /// Is this sop a root part?
121 /// </value> 122 /// </value>
122 [XmlIgnore] 123
123 public bool IsRoot 124 public bool IsRoot
124 { 125 {
125 get { return ParentGroup.RootPart == this; } 126 get { return ParentGroup.RootPart == this; }
126 } 127 }
127 128
128 // use only one serializer to give the runtime a chance to optimize it (it won't do that if you
129 // use a new instance every time)
130 private static XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
131
132 #region Fields 129 #region Fields
133 130
134 public bool AllowedDrop; 131 public bool AllowedDrop;
135 132
136 [XmlIgnore] 133
137 public bool DIE_AT_EDGE; 134 public bool DIE_AT_EDGE;
138 135
139 [XmlIgnore] 136
140 public bool RETURN_AT_EDGE; 137 public bool RETURN_AT_EDGE;
141 138
142 [XmlIgnore] 139
143 public bool BlockGrab; 140 public bool BlockGrab;
144 141
145 [XmlIgnore] 142
146 public bool StatusSandbox; 143 public bool StatusSandbox;
147 144
148 [XmlIgnore] 145
149 public Vector3 StatusSandboxPos; 146 public Vector3 StatusSandboxPos;
150 147
151 // TODO: This needs to be persisted in next XML version update! 148 // TODO: This needs to be persisted in next XML version update!
@@ -167,33 +164,34 @@ namespace OpenSim.Region.Framework.Scenes
167 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. 164 // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet.
168 // Not a big problem as long as the script that sets it remains in the prim on startup. 165 // Not a big problem as long as the script that sets it remains in the prim on startup.
169 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script) 166 // for SL compatibility it should be persisted though (set sound / displaytext / particlesystem, kill script)
170 [XmlIgnore] 167
171 public UUID Sound; 168 public UUID Sound;
172 169
173 [XmlIgnore] 170
174 public byte SoundFlags; 171 public byte SoundFlags;
175 172
176 [XmlIgnore] 173
177 public double SoundGain; 174 public double SoundGain;
178 175
179 [XmlIgnore] 176
180 public double SoundRadius; 177 public double SoundRadius;
181 178
182 [XmlIgnore] 179
183 public uint TimeStampFull; 180 public uint TimeStampFull;
184 181
185 [XmlIgnore] 182
186 public uint TimeStampLastActivity; // Will be used for AutoReturn 183 public uint TimeStampLastActivity; // Will be used for AutoReturn
187 184
188 [XmlIgnore] 185
189 public uint TimeStampTerse; 186 public uint TimeStampTerse;
190 187
191 [XmlIgnore] 188
192 public UUID FromItemID; 189 public UUID FromItemID;
193 190
194 [XmlIgnore] 191
195 public UUID FromFolderID; 192 public UUID FromFolderID;
196 193
194<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
197 // The following two are to hold the attachment data 195 // The following two are to hold the attachment data
198 // while an object is inworld 196 // while an object is inworld
199 [XmlIgnore] 197 [XmlIgnore]
@@ -203,15 +201,18 @@ namespace OpenSim.Region.Framework.Scenes
203 public Vector3 AttachOffset = Vector3.Zero; 201 public Vector3 AttachOffset = Vector3.Zero;
204 202
205 [XmlIgnore] 203 [XmlIgnore]
204=======
205
206>>>>>>> master:OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
206 public int STATUS_ROTATE_X; 207 public int STATUS_ROTATE_X;
207 208
208 [XmlIgnore] 209
209 public int STATUS_ROTATE_Y; 210 public int STATUS_ROTATE_Y;
210 211
211 [XmlIgnore] 212
212 public int STATUS_ROTATE_Z; 213 public int STATUS_ROTATE_Z;
213 214
214 [XmlIgnore] 215
215 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); 216 private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>();
216 217
217 /// <value> 218 /// <value>
@@ -220,68 +221,68 @@ namespace OpenSim.Region.Framework.Scenes
220 /// </value> 221 /// </value>
221 private UUID m_fromUserInventoryItemID; 222 private UUID m_fromUserInventoryItemID;
222 223
223 [XmlIgnore] 224
224 public UUID FromUserInventoryItemID 225 public UUID FromUserInventoryItemID
225 { 226 {
226 get { return m_fromUserInventoryItemID; } 227 get { return m_fromUserInventoryItemID; }
227 } 228 }
228 229
229 [XmlIgnore] 230
230 public bool IsAttachment; 231 public bool IsAttachment;
231 232
232 [XmlIgnore] 233
233 public scriptEvents AggregateScriptEvents; 234 public scriptEvents AggregateScriptEvents;
234 235
235 [XmlIgnore] 236
236 public UUID AttachedAvatar; 237 public UUID AttachedAvatar;
237 238
238 [XmlIgnore] 239
239 public Vector3 AttachedPos; 240 public Vector3 AttachedPos;
240 241
241 [XmlIgnore] 242
242 public uint AttachmentPoint; 243 public uint AttachmentPoint;
243 244
244 [XmlIgnore] 245
245 public Vector3 RotationAxis = Vector3.One; 246 public Vector3 RotationAxis = Vector3.One;
246 247
247 [XmlIgnore] 248
248 public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this 249 public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this
249 // Certainly this must be a persistant setting finally 250 // Certainly this must be a persistant setting finally
250 251
251 [XmlIgnore] 252
252 public bool IsWaitingForFirstSpinUpdatePacket; 253 public bool IsWaitingForFirstSpinUpdatePacket;
253 254
254 [XmlIgnore] 255
255 public Quaternion SpinOldOrientation = Quaternion.Identity; 256 public Quaternion SpinOldOrientation = Quaternion.Identity;
256 257
257 [XmlIgnore] 258
258 public Quaternion m_APIDTarget = Quaternion.Identity; 259 public Quaternion m_APIDTarget = Quaternion.Identity;
259 260
260 [XmlIgnore] 261
261 public float m_APIDDamp = 0; 262 public float m_APIDDamp = 0;
262 263
263 [XmlIgnore] 264
264 public float m_APIDStrength = 0; 265 public float m_APIDStrength = 0;
265 266
266 /// <summary> 267 /// <summary>
267 /// This part's inventory 268 /// This part's inventory
268 /// </summary> 269 /// </summary>
269 [XmlIgnore] 270
270 public IEntityInventory Inventory 271 public IEntityInventory Inventory
271 { 272 {
272 get { return m_inventory; } 273 get { return m_inventory; }
273 } 274 }
274 protected SceneObjectPartInventory m_inventory; 275 protected SceneObjectPartInventory m_inventory;
275 276
276 [XmlIgnore] 277
277 public bool Undoing; 278 public bool Undoing;
278 279
279 [XmlIgnore] 280
280 public bool IgnoreUndoUpdate = false; 281 public bool IgnoreUndoUpdate = false;
281 282
282 [XmlIgnore] 283
283 private PrimFlags LocalFlags; 284 private PrimFlags LocalFlags;
284 [XmlIgnore] 285
285 private float m_damage = -1.0f; 286 private float m_damage = -1.0f;
286 private byte[] m_TextureAnimation; 287 private byte[] m_TextureAnimation;
287 private byte m_clickAction; 288 private byte m_clickAction;
@@ -289,9 +290,9 @@ namespace OpenSim.Region.Framework.Scenes
289 private string m_description = String.Empty; 290 private string m_description = String.Empty;
290 private readonly List<uint> m_lastColliders = new List<uint>(); 291 private readonly List<uint> m_lastColliders = new List<uint>();
291 private int m_linkNum; 292 private int m_linkNum;
292 [XmlIgnore] 293
293 private int m_scriptAccessPin; 294 private int m_scriptAccessPin;
294 [XmlIgnore] 295
295 private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); 296 private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>();
296 private string m_sitName = String.Empty; 297 private string m_sitName = String.Empty;
297 private Quaternion m_sitTargetOrientation = Quaternion.Identity; 298 private Quaternion m_sitTargetOrientation = Quaternion.Identity;
@@ -562,7 +563,7 @@ namespace OpenSim.Region.Framework.Scenes
562 } 563 }
563 564
564 565
565 [XmlIgnore] 566
566 public Dictionary<int, string> CollisionFilter 567 public Dictionary<int, string> CollisionFilter
567 { 568 {
568 get { return m_CollisionFilter; } 569 get { return m_CollisionFilter; }
@@ -572,21 +573,21 @@ namespace OpenSim.Region.Framework.Scenes
572 } 573 }
573 } 574 }
574 575
575 [XmlIgnore] 576
576 public Quaternion APIDTarget 577 public Quaternion APIDTarget
577 { 578 {
578 get { return m_APIDTarget; } 579 get { return m_APIDTarget; }
579 set { m_APIDTarget = value; } 580 set { m_APIDTarget = value; }
580 } 581 }
581 582
582 [XmlIgnore] 583
583 public float APIDDamp 584 public float APIDDamp
584 { 585 {
585 get { return m_APIDDamp; } 586 get { return m_APIDDamp; }
586 set { m_APIDDamp = value; } 587 set { m_APIDDamp = value; }
587 } 588 }
588 589
589 [XmlIgnore] 590
590 public float APIDStrength 591 public float APIDStrength
591 { 592 {
592 get { return m_APIDStrength; } 593 get { return m_APIDStrength; }
@@ -632,33 +633,41 @@ namespace OpenSim.Region.Framework.Scenes
632 set { m_LoopSoundSlavePrims = value; } 633 set { m_LoopSoundSlavePrims = value; }
633 } 634 }
634 635
636<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
637=======
638
639>>>>>>> master:OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
635 public Byte[] TextureAnimation 640 public Byte[] TextureAnimation
636 { 641 {
637 get { return m_TextureAnimation; } 642 get { return m_TextureAnimation; }
638 set { m_TextureAnimation = value; } 643 set { m_TextureAnimation = value; }
639 } 644 }
640 645
646<<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
647=======
648
649>>>>>>> master:OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
641 public Byte[] ParticleSystem 650 public Byte[] ParticleSystem
642 { 651 {
643 get { return m_particleSystem; } 652 get { return m_particleSystem; }
644 set { m_particleSystem = value; } 653 set { m_particleSystem = value; }
645 } 654 }
646 655
647 [XmlIgnore] 656
648 public DateTime Expires 657 public DateTime Expires
649 { 658 {
650 get { return m_expires; } 659 get { return m_expires; }
651 set { m_expires = value; } 660 set { m_expires = value; }
652 } 661 }
653 662
654 [XmlIgnore] 663
655 public DateTime Rezzed 664 public DateTime Rezzed
656 { 665 {
657 get { return m_rezzed; } 666 get { return m_rezzed; }
658 set { m_rezzed = value; } 667 set { m_rezzed = value; }
659 } 668 }
660 669
661 [XmlIgnore] 670
662 public float Damage 671 public float Damage
663 { 672 {
664 get { return m_damage; } 673 get { return m_damage; }
@@ -1043,7 +1052,7 @@ namespace OpenSim.Region.Framework.Scenes
1043 } 1052 }
1044 } 1053 }
1045 1054
1046 [XmlIgnore] 1055
1047 public bool CreateSelected 1056 public bool CreateSelected
1048 { 1057 {
1049 get { return m_createSelected; } 1058 get { return m_createSelected; }
@@ -1233,14 +1242,14 @@ namespace OpenSim.Region.Framework.Scenes
1233 set { m_occupied = value; } 1242 set { m_occupied = value; }
1234 } 1243 }
1235 1244
1236 [XmlIgnore] 1245
1237 public UUID SitTargetAvatar 1246 public UUID SitTargetAvatar
1238 { 1247 {
1239 get { return m_sitTargetAvatar; } 1248 get { return m_sitTargetAvatar; }
1240 set { m_sitTargetAvatar = value; } 1249 set { m_sitTargetAvatar = value; }
1241 } 1250 }
1242 1251
1243 [XmlIgnore] 1252
1244 public virtual UUID RegionID 1253 public virtual UUID RegionID
1245 { 1254 {
1246 get 1255 get
@@ -1254,7 +1263,7 @@ namespace OpenSim.Region.Framework.Scenes
1254 } 1263 }
1255 1264
1256 private UUID _parentUUID = UUID.Zero; 1265 private UUID _parentUUID = UUID.Zero;
1257 [XmlIgnore] 1266
1258 public UUID ParentUUID 1267 public UUID ParentUUID
1259 { 1268 {
1260 get 1269 get
@@ -1268,7 +1277,7 @@ namespace OpenSim.Region.Framework.Scenes
1268 set { _parentUUID = value; } 1277 set { _parentUUID = value; }
1269 } 1278 }
1270 1279
1271 [XmlIgnore] 1280
1272 public string SitAnimation 1281 public string SitAnimation
1273 { 1282 {
1274 get { return m_sitAnimation; } 1283 get { return m_sitAnimation; }
@@ -1884,7 +1893,7 @@ namespace OpenSim.Region.Framework.Scenes
1884 /// </summary> 1893 /// </summary>
1885 /// <param name="xmlReader"></param> 1894 /// <param name="xmlReader"></param>
1886 /// <returns></returns> 1895 /// <returns></returns>
1887 public static SceneObjectPart FromXml(XmlReader xmlReader) 1896 public static SceneObjectPart FromXml(XmlTextReader xmlReader)
1888 { 1897 {
1889 return FromXml(UUID.Zero, xmlReader); 1898 return FromXml(UUID.Zero, xmlReader);
1890 } 1899 }
@@ -1895,9 +1904,9 @@ namespace OpenSim.Region.Framework.Scenes
1895 /// <param name="fromUserInventoryItemId">The inventory id from which this part came, if applicable</param> 1904 /// <param name="fromUserInventoryItemId">The inventory id from which this part came, if applicable</param>
1896 /// <param name="xmlReader"></param> 1905 /// <param name="xmlReader"></param>
1897 /// <returns></returns> 1906 /// <returns></returns>
1898 public static SceneObjectPart FromXml(UUID fromUserInventoryItemId, XmlReader xmlReader) 1907 public static SceneObjectPart FromXml(UUID fromUserInventoryItemId, XmlTextReader xmlReader)
1899 { 1908 {
1900 SceneObjectPart part = (SceneObjectPart)serializer.Deserialize(xmlReader); 1909 SceneObjectPart part = SceneObjectSerializer.Xml2ToSOP(xmlReader);
1901 part.m_fromUserInventoryItemID = fromUserInventoryItemId; 1910 part.m_fromUserInventoryItemID = fromUserInventoryItemId;
1902 1911
1903 // for tempOnRez objects, we have to fix the Expire date. 1912 // for tempOnRez objects, we have to fix the Expire date.
@@ -4087,9 +4096,9 @@ namespace OpenSim.Region.Framework.Scenes
4087 /// Serialize this part to xml. 4096 /// Serialize this part to xml.
4088 /// </summary> 4097 /// </summary>
4089 /// <param name="xmlWriter"></param> 4098 /// <param name="xmlWriter"></param>
4090 public void ToXml(XmlWriter xmlWriter) 4099 public void ToXml(XmlTextWriter xmlWriter)
4091 { 4100 {
4092 serializer.Serialize(xmlWriter, this); 4101 SceneObjectSerializer.SOPToXml2(xmlWriter, this, new Dictionary<string, object>());
4093 } 4102 }
4094 4103
4095 public void TriggerScriptChangedEvent(Changed val) 4104 public void TriggerScriptChangedEvent(Changed val)