Rename Bounciness to Restitution

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

View File

@ -1339,7 +1339,7 @@ namespace OpenSim.Data.MySQL
prim.Density = (float)(double)row["Density"]; prim.Density = (float)(double)row["Density"];
prim.GravityModifier = (float)(double)row["GravityModifier"]; prim.GravityModifier = (float)(double)row["GravityModifier"];
prim.Friction = (float)(double)row["Friction"]; prim.Friction = (float)(double)row["Friction"];
prim.Bounciness = (float)(double)row["Restitution"]; prim.Restitution = (float)(double)row["Restitution"];
SOPVehicle vehicle = null; SOPVehicle vehicle = null;
@ -1725,7 +1725,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("Density", (double)prim.Density); cmd.Parameters.AddWithValue("Density", (double)prim.Density);
cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier); cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier);
cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); 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) if (prim.VehicleParams != null)
cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2()); cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2());

View File

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

View File

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

View File

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

View File

@ -633,7 +633,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) 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) private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader)
@ -1363,8 +1363,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("Density", sop.Density.ToString().ToLower()); writer.WriteElementString("Density", sop.Density.ToString().ToLower());
if (sop.Friction != 0.6f) if (sop.Friction != 0.6f)
writer.WriteElementString("Friction", sop.Friction.ToString().ToLower()); writer.WriteElementString("Friction", sop.Friction.ToString().ToLower());
if (sop.Bounciness != 0.5f) if (sop.Restitution != 0.5f)
writer.WriteElementString("Bounce", sop.Bounciness.ToString().ToLower()); writer.WriteElementString("Bounce", sop.Restitution.ToString().ToLower());
if (sop.GravityModifier != 1.0f) if (sop.GravityModifier != 1.0f)
writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower()); writer.WriteElementString("GravityModifier", sop.GravityModifier.ToString().ToLower());
WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset()); WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset());

View File

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