minor: code tidy up - remove a couple of Console.WriteLine() accidentally added in the last commit
parent
36df9ae79a
commit
29034bc0e0
|
@ -54,7 +54,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
/// <summary>
|
||||
/// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves.
|
||||
/// </summary>
|
||||
|
||||
public class OdePrim : PhysicsActor
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
@ -279,14 +278,14 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
public override bool Selected
|
||||
{
|
||||
set {
|
||||
|
||||
|
||||
set
|
||||
{
|
||||
// This only makes the object not collidable if the object
|
||||
// is physical or the object is modified somehow *IN THE FUTURE*
|
||||
// without this, if an avatar selects prim, they can walk right
|
||||
// through it while it's selected
|
||||
m_collisionscore = 0;
|
||||
|
||||
if ((m_isphysical && !_zeroFlag) || !value)
|
||||
{
|
||||
m_taintselected = value;
|
||||
|
@ -297,7 +296,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
m_taintselected = value;
|
||||
m_isSelected = value;
|
||||
}
|
||||
if (m_isSelected) disableBodySoft();
|
||||
|
||||
if (m_isSelected)
|
||||
disableBodySoft();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,8 +325,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//m_log.Warn("Setting Geom to: " + prim_geom);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void enableBodySoft()
|
||||
{
|
||||
if (!childPrim)
|
||||
|
@ -626,8 +625,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
float taperX1;
|
||||
float taperY1;
|
||||
float taperX;
|
||||
|
@ -682,9 +679,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
// else if (returnMass > _parent_scene.maximumMassObject)
|
||||
// returnMass = _parent_scene.maximumMassObject;
|
||||
|
||||
|
||||
|
||||
|
||||
// Recursively calculate mass
|
||||
bool HasChildPrim = false;
|
||||
lock (childrenPrim)
|
||||
|
@ -693,8 +687,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
HasChildPrim = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (HasChildPrim)
|
||||
{
|
||||
OdePrim[] childPrimArr = new OdePrim[0];
|
||||
|
@ -711,10 +705,12 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (returnMass > _parent_scene.maximumMassObject)
|
||||
returnMass = _parent_scene.maximumMassObject;
|
||||
|
||||
return returnMass;
|
||||
}// end CalculateMass
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -937,7 +933,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void changeAngularLock(float timestep)
|
||||
{
|
||||
// do we have a Physical object?
|
||||
|
@ -965,7 +960,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
// Store this for later in case we get turned into a separate body
|
||||
m_angularlock = m_taintAngularLock;
|
||||
|
||||
}
|
||||
|
||||
private void changelink(float timestep)
|
||||
|
@ -1104,7 +1098,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
m_log.DebugFormat("[PHYSICS]: {0} ain't got no boooooooooddy, no body", Name);
|
||||
}
|
||||
|
||||
|
||||
prm.m_interpenetrationcount = 0;
|
||||
prm.m_collisionscore = 0;
|
||||
prm.m_disabled = false;
|
||||
|
@ -1164,7 +1157,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void ChildSetGeom(OdePrim odePrim)
|
||||
|
@ -1226,16 +1218,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
childrenPrim.Remove(odePrim);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (Body != IntPtr.Zero)
|
||||
{
|
||||
_parent_scene.remActivePrim(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
lock (childrenPrim)
|
||||
{
|
||||
foreach (OdePrim prm in childrenPrim)
|
||||
|
@ -1244,8 +1231,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
ParentPrim(prm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void changeSelectedStatus(float timestep)
|
||||
|
@ -1686,12 +1671,10 @@ Console.WriteLine(" JointCreateFixed");
|
|||
PID_G = m_PIDTau + 1;
|
||||
}
|
||||
|
||||
|
||||
// Where are we, and where are we headed?
|
||||
d.Vector3 pos = d.BodyGetPosition(Body);
|
||||
d.Vector3 vel = d.BodyGetLinearVel(Body);
|
||||
|
||||
|
||||
// Non-Vehicles have a limited set of Hover options.
|
||||
// determine what our target height really is based on HoverType
|
||||
switch (m_PIDHoverType)
|
||||
|
@ -1797,8 +1780,6 @@ Console.WriteLine(" JointCreateFixed");
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void rotate(float timestep)
|
||||
{
|
||||
d.Quaternion myrot = new d.Quaternion();
|
||||
|
@ -1909,7 +1890,6 @@ Console.WriteLine(" JointCreateFixed");
|
|||
|
||||
public void changesize(float timestamp)
|
||||
{
|
||||
|
||||
string oldname = _parent_scene.geom_name_map[prim_geom];
|
||||
|
||||
if (_size.X <= 0) _size.X = 0.01f;
|
||||
|
@ -1961,15 +1941,13 @@ Console.WriteLine(" JointCreateFixed");
|
|||
mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
||||
|
||||
//IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
||||
Console.WriteLine("changesize 1");
|
||||
//Console.WriteLine("changesize 1");
|
||||
CreateGeom(m_targetSpace, mesh);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
_mesh = null;
|
||||
Console.WriteLine("changesize 2");
|
||||
//Console.WriteLine("changesize 2");
|
||||
CreateGeom(m_targetSpace, _mesh);
|
||||
}
|
||||
|
||||
|
@ -2005,8 +1983,6 @@ Console.WriteLine("changesize 2");
|
|||
m_taintsize = _size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void changefloatonwater(float timestep)
|
||||
{
|
||||
m_collidesWater = m_taintCollidesWater;
|
||||
|
@ -2071,13 +2047,13 @@ Console.WriteLine("changesize 2");
|
|||
|
||||
IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
||||
// createmesh returns null when it doesn't mesh.
|
||||
Console.WriteLine("changeshape needed meshing");
|
||||
//Console.WriteLine("changeshape needed meshing");
|
||||
CreateGeom(m_targetSpace, mesh);
|
||||
}
|
||||
else
|
||||
{
|
||||
_mesh = null;
|
||||
Console.WriteLine("changeshape not need meshing");
|
||||
//Console.WriteLine("changeshape not need meshing");
|
||||
CreateGeom(m_targetSpace, null);
|
||||
}
|
||||
|
||||
|
@ -2162,11 +2138,8 @@ Console.WriteLine("changeshape not need meshing");
|
|||
}
|
||||
|
||||
m_taintforce = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void changeSetTorque(float timestamp)
|
||||
{
|
||||
if (!m_isSelected)
|
||||
|
@ -2835,7 +2808,6 @@ Console.WriteLine("changeshape not need meshing");
|
|||
|
||||
public override float APIDDamping{ set { return; } }
|
||||
|
||||
|
||||
private void createAMotor(Vector3 axis)
|
||||
{
|
||||
if (Body == IntPtr.Zero)
|
||||
|
@ -2955,7 +2927,6 @@ Console.WriteLine("changeshape not need meshing");
|
|||
//d.JointSetAMotorParam(Amotor, (int) dParam.Vel, 9000f);
|
||||
d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f);
|
||||
d.JointSetAMotorParam(Amotor, (int)dParam.FMax, Mass * 50f);//
|
||||
|
||||
}
|
||||
|
||||
public Matrix4 FromDMass(d.Mass pMass)
|
||||
|
@ -3040,8 +3011,6 @@ Console.WriteLine("changeshape not need meshing");
|
|||
return Matrix4.Identity; // should probably throw an error. singluar matrix inverse not possible
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (Adjoint(pMat) / determinant3x3(pMat));
|
||||
}
|
||||
|
||||
|
@ -3078,6 +3047,7 @@ Console.WriteLine("changeshape not need meshing");
|
|||
}
|
||||
m++;
|
||||
}
|
||||
|
||||
return minor;
|
||||
}
|
||||
|
||||
|
@ -3180,7 +3150,6 @@ Console.WriteLine("changeshape not need meshing");
|
|||
|
||||
det = diag1 + diag2 + diag3 - (diag4 + diag5 + diag6);
|
||||
return det;
|
||||
|
||||
}
|
||||
|
||||
private static void DMassCopy(ref d.Mass src, ref d.Mass dst)
|
||||
|
@ -3205,6 +3174,5 @@ Console.WriteLine("changeshape not need meshing");
|
|||
{
|
||||
m_material = pMaterial;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
|
||||
//#define USE_DRAWSTUFF
|
||||
//#define DEBUG
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1716,7 +1717,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||
{
|
||||
// m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
|
||||
#if SPAM
|
||||
m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
|
||||
#endif
|
||||
|
||||
PhysicsActor result;
|
||||
IMesh mesh = null;
|
||||
|
@ -2460,7 +2463,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
if (pbs.SculptEntry && !meshSculptedPrim)
|
||||
{
|
||||
#if SPAM
|
||||
#if DEBUG
|
||||
m_log.Warn("NonMesh");
|
||||
#endif
|
||||
return false;
|
||||
|
@ -2482,7 +2485,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
&& pbs.PathScaleX == 100 && pbs.PathScaleY == 100
|
||||
&& pbs.PathShearX == 0 && pbs.PathShearY == 0)
|
||||
{
|
||||
#if SPAM
|
||||
#if DEBUG
|
||||
m_log.Warn("NonMesh");
|
||||
#endif
|
||||
return false;
|
||||
|
@ -2563,12 +2566,12 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
|
||||
if (iPropertiesNotSupportedDefault == 0)
|
||||
{
|
||||
#if SPAM
|
||||
#if DEBUG
|
||||
m_log.Warn("NonMesh");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#if SPAM
|
||||
#if DEBUG
|
||||
m_log.Debug("Mesh");
|
||||
#endif
|
||||
return true;
|
||||
|
@ -3606,7 +3609,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
else
|
||||
{
|
||||
m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data.");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue