Rename Bounciness to Restitution

avinationmerge
Melanie 2013-02-07 03:40:48 +00:00
parent b64460e541
commit 6aa876a83b
6 changed files with 12 additions and 12 deletions

View File

@ -1345,7 +1345,7 @@ namespace OpenSim.Data.MySQL
prim.Density = (float)(double)row["Density"];
prim.GravityModifier = (float)(double)row["GravityModifier"];
prim.Friction = (float)(double)row["Friction"];
prim.Bounciness = (float)(double)row["Restitution"];
prim.Restitution = (float)(double)row["Restitution"];
SOPVehicle vehicle = null;
@ -1731,7 +1731,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("Density", (double)prim.Density);
cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier);
cmd.Parameters.AddWithValue("Friction", (double)prim.Friction);
cmd.Parameters.AddWithValue("Restitution", (double)prim.Bounciness);
cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution);
if (prim.VehicleParams != null)
cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2());

View File

@ -1316,7 +1316,7 @@ namespace OpenSim.Region.ClientStack.Linden
object_data["PhysicsShapeType"] = obj.PhysicsShapeType;
object_data["Density"] = obj.Density;
object_data["Friction"] = obj.Friction;
object_data["Restitution"] = obj.Bounciness;
object_data["Restitution"] = obj.Restitution;
object_data["GravityMultiplier"] = obj.GravityModifier;
resp[uuid.ToString()] = object_data;

View File

@ -2654,7 +2654,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
byte physshapetype = part.PhysicsShapeType;
float density = part.Density;
float friction = part.Friction;
float bounce = part.Bounciness;
float bounce = part.Restitution;
float gravmod = part.GravityModifier;
eq.partPhysicsProperties(localid, physshapetype, density, friction, bounce, gravmod,AgentId);

View File

@ -1736,7 +1736,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public float Bounciness
public float Restitution
{
get { return m_bounce; }
set
@ -4494,8 +4494,8 @@ namespace OpenSim.Region.Framework.Scenes
GravityModifier = physdata.GravitationModifier;
if(Friction != physdata.Friction)
Friction = physdata.Friction;
if(Bounciness != physdata.Bounce)
Bounciness = physdata.Bounce;
if(Restitution != physdata.Bounce)
Restitution = physdata.Bounce;
}
/// <summary>
/// Update the flags on this prim. This covers properties such as phantom, physics and temporary.

View File

@ -634,7 +634,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader)
{
obj.Bounciness = reader.ReadElementContentAsFloat("Bounce", String.Empty);
obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty);
}
private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader)
@ -1377,8 +1377,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("Density", sop.Density.ToString().ToLower());
if (sop.Friction != 0.6f)
writer.WriteElementString("Friction", sop.Friction.ToString().ToLower());
if (sop.Bounciness != 0.5f)
writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower());
if (sop.Restitution != 0.5f)
writer.WriteElementString("Bounce", sop.Restitution.ToString().ToLower());
if (sop.GravityModifier != 1.0f)
writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower());
WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset());

View File

@ -7801,7 +7801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
physdata.PhysShapeType = (PhysShapeType)part.PhysicsShapeType;
physdata.Density = part.Density;
physdata.Friction = part.Friction;
physdata.Bounce = part.Bounciness;
physdata.Bounce = part.Restitution;
physdata.GravitationModifier = part.GravityModifier;
if ((material_bits & (int)ScriptBaseClass.DENSITY) != 0)
@ -8194,7 +8194,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ExtraPhysicsData physdata = new ExtraPhysicsData();
physdata.Density = part.Density;
physdata.Bounce = part.Bounciness;
physdata.Bounce = part.Restitution;
physdata.GravitationModifier = part.GravityModifier;
physdata.PhysShapeType = (PhysShapeType)shape_type;