diff options
author | UbitUmarov | 2012-03-13 19:51:41 +0000 |
---|---|---|
committer | UbitUmarov | 2012-03-13 19:51:41 +0000 |
commit | 577d07aa44b5ba7ed4fc3a56a81eeec6c141543a (patch) | |
tree | d575253e72865249af0c9b2f415b2f7139f50f0c /OpenSim/Region/Framework/Scenes | |
parent | let PhysicsShapeType none remove physics remove physics on child parts **UnT... (diff) | |
download | opensim-SC_OLD-577d07aa44b5ba7ed4fc3a56a81eeec6c141543a.zip opensim-SC_OLD-577d07aa44b5ba7ed4fc3a56a81eeec6c141543a.tar.gz opensim-SC_OLD-577d07aa44b5ba7ed4fc3a56a81eeec6c141543a.tar.bz2 opensim-SC_OLD-577d07aa44b5ba7ed4fc3a56a81eeec6c141543a.tar.xz |
missed commit of extraphysics parameters serialization..
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 51a3320..dfa24e5 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -359,9 +359,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
359 | m_SOPXmlProcessors.Add("Torque", ProcessTorque); | 359 | m_SOPXmlProcessors.Add("Torque", ProcessTorque); |
360 | m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); | 360 | m_SOPXmlProcessors.Add("VolumeDetectActive", ProcessVolumeDetectActive); |
361 | 361 | ||
362 | //Ubit comented until proper testing | ||
363 | m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle); | ||
364 | 362 | ||
363 | m_SOPXmlProcessors.Add("Vehicle", ProcessVehicle); | ||
364 | |||
365 | m_SOPXmlProcessors.Add("PhysicsShapeType", ProcessPhysicsShapeType); | ||
366 | m_SOPXmlProcessors.Add("Density", ProcessDensity); | ||
367 | m_SOPXmlProcessors.Add("Friction", ProcessFriction); | ||
368 | m_SOPXmlProcessors.Add("Bounce", ProcessBounce); | ||
369 | m_SOPXmlProcessors.Add("GravityModifier", ProcessGravityModifier); | ||
365 | 370 | ||
366 | #endregion | 371 | #endregion |
367 | 372 | ||
@@ -390,7 +395,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
390 | m_TaskInventoryXmlProcessors.Add("PermsMask", ProcessTIPermsMask); | 395 | m_TaskInventoryXmlProcessors.Add("PermsMask", ProcessTIPermsMask); |
391 | m_TaskInventoryXmlProcessors.Add("Type", ProcessTIType); | 396 | m_TaskInventoryXmlProcessors.Add("Type", ProcessTIType); |
392 | m_TaskInventoryXmlProcessors.Add("OwnerChanged", ProcessTIOwnerChanged); | 397 | m_TaskInventoryXmlProcessors.Add("OwnerChanged", ProcessTIOwnerChanged); |
393 | 398 | ||
394 | #endregion | 399 | #endregion |
395 | 400 | ||
396 | #region ShapeXmlProcessors initialization | 401 | #region ShapeXmlProcessors initialization |
@@ -585,6 +590,31 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
585 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); | 590 | obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); |
586 | } | 591 | } |
587 | 592 | ||
593 | private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlTextReader reader) | ||
594 | { | ||
595 | obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); | ||
596 | } | ||
597 | |||
598 | private static void ProcessDensity(SceneObjectPart obj, XmlTextReader reader) | ||
599 | { | ||
600 | obj.Density = (byte)reader.ReadElementContentAsInt("Density", String.Empty); | ||
601 | } | ||
602 | |||
603 | private static void ProcessFriction(SceneObjectPart obj, XmlTextReader reader) | ||
604 | { | ||
605 | obj.Friction = (byte)reader.ReadElementContentAsInt("Friction", String.Empty); | ||
606 | } | ||
607 | |||
608 | private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) | ||
609 | { | ||
610 | obj.Bounciness = (byte)reader.ReadElementContentAsInt("Bounce", String.Empty); | ||
611 | } | ||
612 | |||
613 | private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) | ||
614 | { | ||
615 | obj.GravityModifier = (byte)reader.ReadElementContentAsInt("GravityModifier", String.Empty); | ||
616 | } | ||
617 | |||
588 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) | 618 | private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) |
589 | { | 619 | { |
590 | bool errors = false; | 620 | bool errors = false; |
@@ -1288,9 +1318,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1288 | 1318 | ||
1289 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); | 1319 | writer.WriteElementString("VolumeDetectActive", sop.VolumeDetectActive.ToString().ToLower()); |
1290 | 1320 | ||
1291 | //Ubit comented until proper testing | 1321 | if (sop.sopVehicle != null) |
1292 | if (sop.sopVehicle != null) | 1322 | sop.sopVehicle.ToXml2(writer); |
1293 | sop.sopVehicle.ToXml2(writer); | 1323 | |
1324 | if(sop.PhysicsShapeType != (byte)PhysShapeType.prim) | ||
1325 | writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower()); | ||
1326 | if (sop.Density != 1000.0f) | ||
1327 | writer.WriteElementString("Density", sop.Density.ToString().ToLower()); | ||
1328 | if (sop.Friction != 0.6f) | ||
1329 | writer.WriteElementString("Friction", sop.Friction.ToString().ToLower()); | ||
1330 | if (sop.Bounciness != 0.5f) | ||
1331 | writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower()); | ||
1332 | if (sop.GravityModifier != 1.0f) | ||
1333 | writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); | ||
1294 | 1334 | ||
1295 | writer.WriteEndElement(); | 1335 | writer.WriteEndElement(); |
1296 | } | 1336 | } |