Rename Bounciness to Restitution
parent
b64460e541
commit
6aa876a83b
|
@ -1345,7 +1345,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;
|
||||||
|
|
||||||
|
@ -1731,7 +1731,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());
|
||||||
|
|
|
@ -1316,7 +1316,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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -1736,7 +1736,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Bounciness
|
public float Restitution
|
||||||
{
|
{
|
||||||
get { return m_bounce; }
|
get { return m_bounce; }
|
||||||
set
|
set
|
||||||
|
@ -4494,8 +4494,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.
|
||||||
|
|
|
@ -634,7 +634,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)
|
||||||
|
@ -1377,8 +1377,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());
|
||||||
|
|
|
@ -7801,7 +7801,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)
|
||||||
|
@ -8194,7 +8194,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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue