bug fixs, added a default physics shape estimator based on being a mesh or not and use it on unlink if new root part as type none. Viewer doesn't get updated even with fullupdates we are missing something still

This commit is contained in:
UbitUmarov
2012-03-14 18:24:04 +00:00
parent c0f70d17fc
commit cf9ebd301c
4 changed files with 82 additions and 18 deletions

View File

@@ -597,22 +597,22 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
private static void ProcessDensity(SceneObjectPart obj, XmlTextReader reader)
{
obj.Density = (byte)reader.ReadElementContentAsInt("Density", String.Empty);
obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty);
}
private static void ProcessFriction(SceneObjectPart obj, XmlTextReader reader)
{
obj.Friction = (byte)reader.ReadElementContentAsInt("Friction", String.Empty);
obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty);
}
private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader)
{
obj.Bounciness = (byte)reader.ReadElementContentAsInt("Bounce", String.Empty);
obj.Bounciness = reader.ReadElementContentAsFloat("Bounce", String.Empty);
}
private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader)
{
obj.GravityModifier = (byte)reader.ReadElementContentAsInt("GravityModifier", String.Empty);
obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty);
}
private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader)
@@ -1321,7 +1321,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
if (sop.sopVehicle != null)
sop.sopVehicle.ToXml2(writer);
if(sop.PhysicsShapeType != (byte)PhysShapeType.prim)
if(sop.PhysicsShapeType != sop.DefaultPhysicsShapeType())
writer.WriteElementString("PhysicsShapeType", sop.PhysicsShapeType.ToString().ToLower());
if (sop.Density != 1000.0f)
writer.WriteElementString("Density", sop.Density.ToString().ToLower());