Massive tab and trailing space cleanup

This commit is contained in:
Melanie Thielker
2017-01-05 19:07:37 +00:00
parent e88e2945e9
commit b16abc8166
959 changed files with 23646 additions and 23646 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -149,7 +149,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
/// Collision geometry
/// </summary>
internal IntPtr Shell { get; private set; }
private IntPtr Amotor = IntPtr.Zero;
private d.Mass ShellMass;
@@ -237,7 +237,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
m_tainted_isPhysical = true; // new tainted status: need to create ODE information
_parent_scene.AddPhysicsActorTaint(this);
Name = avName;
}
@@ -461,7 +461,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5;
}
m_taintPosition = value;
m_taintPosition = value;
_parent_scene.AddPhysicsActorTaint(this);
}
else
@@ -796,7 +796,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
internal void Move(List<OdeCharacter> defects)
{
// no lock; for now it's only called from within Simulate()
// If the PID Controller isn't active then we set our force
// calculating base velocity to the current position
@@ -811,7 +811,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
d.Vector3 localpos = d.BodyGetPosition(Body);
Vector3 localPos = new Vector3(localpos.X, localpos.Y, localpos.Z);
if (!localPos.IsFinite())
{
m_log.WarnFormat(
@@ -1248,10 +1248,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
}
public override Vector3 PIDTarget { set { return; } }
public override bool PIDActive
{
public override bool PIDActive
{
get { return false; }
set { return; }
set { return; }
}
public override float PIDTau { set { return; } }
@@ -1259,7 +1259,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
public override bool PIDHoverActive {get {return false;} set { return; } }
public override PIDHoverType PIDHoverType { set { return; } }
public override float PIDHoverTau { set { return; } }
public override Quaternion APIDTarget{ set { return; } }
public override bool APIDActive{ set { return; } }
@@ -1369,7 +1369,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
// m_log.DebugFormat(
// "[ODE CHARACTER]: Changing capsule size from {0} to {1} for {2}",
// CAPSULE_LENGTH, m_tainted_CAPSULE_LENGTH, Name);
m_pidControllerActive = true;
// no lock needed on _parent_scene.OdeLock because we are called from within the thread lock in OdePlugin's simulate()

View File

@@ -914,7 +914,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
// Sum velocities
m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection
if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0)
{
m_lastAngularVelocity.X = 0;

View File

@@ -9,14 +9,14 @@ using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.PhysicsModule.ODE
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")]
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ODEPhysicsScene")]
public class OdeModule : INonSharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool m_Enabled = false;
private IConfigSource m_config;
private OdeScene m_scene;
private IConfigSource m_config;
private OdeScene m_scene;
#region INonSharedRegionModule
@@ -84,6 +84,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
m_scene.RegionLoaded();
}
#endregion
#endregion
}
}

View File

@@ -33,7 +33,7 @@
* ODEDynamics.cs contains methods dealing with Prim Physical motion
* (dynamics) and the associated settings. Old Linear and angular
* motors for dynamic motion have been replace with MoveLinear()
* and MoveAngular(); 'Physical' is used only to switch ODE dynamic
* and MoveAngular(); 'Physical' is used only to switch ODE dynamic
* simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to
* switch between 'VEHICLE' parameter use and general dynamics
* settings use.
@@ -133,7 +133,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
private float m_targetHoverHeight;
private float m_groundHeight;
private float m_waterHeight;
private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
private float m_buoyancy; //KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
// private float m_tensor = 5f;
private int body_autodisable_frames = 20;
@@ -170,7 +170,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
private PrimitiveBaseShape _pbs;
private OdeScene _parent_scene;
/// <summary>
/// The physics space which contains prim geometries
/// </summary>
@@ -443,7 +443,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
d.BodySetAutoDisableFlag(Body, true);
d.BodySetAutoDisableSteps(Body, body_autodisable_frames);
// disconnect from world gravity so we can apply buoyancy
d.BodySetGravityMode (Body, false);
@@ -474,8 +474,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
float returnMass = 0;
float hollowAmount = (float)_pbs.ProfileHollow * 2.0e-5f;
float hollowVolume = hollowAmount * hollowAmount;
float hollowVolume = hollowAmount * hollowAmount;
switch (_pbs.ProfileShape)
{
case ProfileShape.Square:
@@ -511,16 +511,16 @@ namespace OpenSim.Region.PhysicsModule.ODE
else if (_pbs.PathCurve == (byte)Extrusion.Curve1)
{
//a tube
//a tube
volume *= 0.78539816339e-2f * (float)(200 - _pbs.PathScaleX);
tmp= 1.0f -2.0e-2f * (float)(200 - _pbs.PathScaleY);
volume -= volume*tmp*tmp;
if (hollowAmount > 0.0)
{
hollowVolume *= hollowAmount;
switch (_pbs.HollowShape)
{
case HollowShape.Square:
@@ -579,7 +579,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
volume *= 0.61685027506808491367715568749226e-2f * (float)(200 - _pbs.PathScaleX);
tmp = 1.0f - .02f * (float)(200 - _pbs.PathScaleY);
volume *= (1.0f - tmp * tmp);
if (hollowAmount > 0.0)
{
@@ -845,7 +845,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
else
{
_parent_scene.DeactivatePrim(this);
m_collisionCategories &= ~CollisionCategories.Body;
m_collisionFlags &= ~(CollisionCategories.Wind | CollisionCategories.Land);
@@ -916,7 +916,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
else
{
_triMeshData = d.GeomTriMeshDataCreate();
d.GeomTriMeshDataBuildSimple(_triMeshData, vertices, vertexStride, vertexCount, indices, indexCount, triStride);
d.GeomTriMeshDataPreprocess(_triMeshData);
m_MeshToTriMeshMap[mesh] = _triMeshData;
@@ -974,7 +974,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
rotate();
}
}
if (m_taintPhysics != IsPhysical && !(m_taintparent != _parent))
changePhysicsStatus();
@@ -1074,7 +1074,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
else if (_parent != null && m_taintparent == null)
{
//Console.WriteLine(" changelink B");
if (_parent is OdePrim)
{
OdePrim obj = (OdePrim)_parent;
@@ -1082,16 +1082,16 @@ Console.WriteLine("ZProcessTaints for " + Name);
childPrim = false;
//_parent = null;
}
/*
if (Body != (IntPtr)0 && _linkJointGroup != (IntPtr)0)
d.JointGroupDestroy(_linkJointGroup);
_linkJointGroup = (IntPtr)0;
m_linkJoint = (IntPtr)0;
*/
}
_parent = m_taintparent;
m_taintPhysics = IsPhysical;
}
@@ -1345,7 +1345,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
// in between the disabling and the collision properties setting
// which would wake the physical body up from a soft disabling and potentially cause it to fall
// through the ground.
// NOTE FOR JOINTS: this doesn't always work for jointed assemblies because if you select
// just one part of the assembly, the rest of the assembly is non-selected and still simulating,
// so that causes the selected part to wake up and continue moving.
@@ -1359,7 +1359,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
// e.g. we select 100 prims that are connected by joints. non-atomically, the first 50 are
// selected and disabled. then, due to a thread switch, the selection processing is
// interrupted and the physics engine continues to simulate, so the last 50 items, whose
// selection was not yet processed, continues to simulate. this wakes up ALL of the
// selection was not yet processed, continues to simulate. this wakes up ALL of the
// first 50 again. then the last 50 are disabled. then the first 50, which were just woken
// up, start simulating again, which in turn wakes up the last 50.
@@ -1565,7 +1565,7 @@ Console.WriteLine("CreateGeom:");
private void changeadd()
{
// m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name);
int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position);
@@ -1711,10 +1711,10 @@ Console.WriteLine(" JointCreateFixed");
// fz = 0f;
//m_log.Info(m_collisionFlags.ToString());
//KF: m_buoyancy should be set by llSetBuoyancy() for non-vehicle.
// would come from SceneObjectPart.cs, public void SetBuoyancy(float fvalue) , PhysActor.Buoyancy = fvalue; ??
// m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up
// m_buoyancy: (unlimited value) <0=Falls fast; 0=1g; 1=0g; >1 = floats up
// gravityz multiplier = 1 - m_buoyancy
fz = _parent_scene.gravityz * (1.0f - m_buoyancy) * m_mass;
@@ -1729,7 +1729,7 @@ Console.WriteLine(" JointCreateFixed");
fz = 0f;
// no lock; for now it's only called from within Simulate()
// If the PID Controller isn't active then we set our force
// calculating base velocity to the current position
@@ -1738,7 +1738,7 @@ Console.WriteLine(" JointCreateFixed");
//PID_G = PID_G / m_PIDTau;
m_PIDTau = 1;
}
if ((PID_G - m_PIDTau) <= 0)
{
PID_G = m_PIDTau + 1;
@@ -1761,7 +1761,7 @@ Console.WriteLine(" JointCreateFixed");
if (_target_velocity.ApproxEquals(Vector3.Zero,0.1f))
{
// keep track of where we stopped. No more slippin' & slidin'
// We only want to deactivate the PID Controller if we think we want to have our surrogate
// react to the physics scene by moving it's position.
// Avatar to Avatar collisions
@@ -1782,7 +1782,7 @@ Console.WriteLine(" JointCreateFixed");
// We're flying and colliding with something
fx = ((_target_velocity.X) - vel.X) * (PID_D);
fy = ((_target_velocity.Y) - vel.Y) * (PID_D);
// vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P;
fz = fz + ((_target_velocity.Z - vel.Z) * (PID_D) * m_mass);
@@ -1793,7 +1793,7 @@ Console.WriteLine(" JointCreateFixed");
if (m_useHoverPID && !PIDActive)
{
//Console.WriteLine("Hover " + Name);
// If we're using the PID controller, then we have no gravity
fz = (-1 * _parent_scene.gravityz) * m_mass;
@@ -1850,7 +1850,7 @@ Console.WriteLine(" JointCreateFixed");
if (_target_velocity.ApproxEquals(Vector3.Zero, 0.1f))
{
// keep track of where we stopped. No more slippin' & slidin'
// We only want to deactivate the PID Controller if we think we want to have our surrogate
// react to the physics scene by moving it's position.
// Avatar to Avatar collisions
@@ -1888,7 +1888,7 @@ Console.WriteLine(" JointCreateFixed");
{
// A physical body at rest on a surface will auto-disable after a while,
// this appears to re-enable it incase the surface it is upon vanishes,
// and the body should fall again.
// and the body should fall again.
d.BodySetLinearVel(Body, 0f, 0f, 0f);
d.BodySetForce(Body, 0, 0, 0);
enableBodySoft();
@@ -1897,7 +1897,7 @@ Console.WriteLine(" JointCreateFixed");
// 35x10 = 350n times the mass per second applied maximum.
float nmax = 35f * m_mass;
float nmin = -35f * m_mass;
if (fx > nmax)
fx = nmax;
if (fx < nmin)
@@ -1916,7 +1916,7 @@ Console.WriteLine(" JointCreateFixed");
// _zeroPosition = d.BodyGetPosition(Body);
return;
//Console.WriteLine("Nothing " + Name);
}
}
@@ -1942,7 +1942,7 @@ Console.WriteLine(" JointCreateFixed");
// daughter prim, do Geom set
d.GeomSetQuaternion(prim_geom, ref myrot);
}
resetCollisionAccounting();
m_taintrot = _orientation;
}
@@ -2080,7 +2080,7 @@ Console.WriteLine(" JointCreateFixed");
else
m_assetFailed = false;
}
}
CreateGeom(m_targetSpace, mesh);
@@ -2312,7 +2312,7 @@ Console.WriteLine(" JointCreateFixed");
}
d.BodyEnable(Body);
d.BodyAddTorque(Body, iforce.X, iforce.Y, iforce.Z);
}
m_angularforcelist.Clear();
}
@@ -2342,7 +2342,7 @@ Console.WriteLine(" JointCreateFixed");
d.BodySetLinearVel(Body, m_taintVelocity.X, m_taintVelocity.Y, m_taintVelocity.Z);
}
}
//resetCollisionAccounting();
}
@@ -2686,7 +2686,7 @@ Console.WriteLine(" JointCreateFixed");
if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
m_vehicle.Stop(); // this also updates vehicle last position from the body position
enableBodySoft();
outofBounds = false;
@@ -2899,12 +2899,12 @@ Console.WriteLine(" JointCreateFixed");
_acceleration = ((_velocity - m_lastVelocity) / 0.1f);
_acceleration = new Vector3(_velocity.X - m_lastVelocity.X / 0.1f, _velocity.Y - m_lastVelocity.Y / 0.1f, _velocity.Z - m_lastVelocity.Z / 0.1f);
//m_log.Info("[PHYSICS]: V1: " + _velocity + " V2: " + m_lastVelocity + " Acceleration: " + _acceleration.ToString());
// Note here that linearvelocity is affecting angular velocity... so I'm guessing this is a vehicle specific thing...
// it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large.
// Note here that linearvelocity is affecting angular velocity... so I'm guessing this is a vehicle specific thing...
// it does make sense to do this for tiny little instabilities with physical prim, however 0.5m/frame is fairly large.
// reducing this to 0.02m/frame seems to help the angular rubberbanding quite a bit, however, to make sure it doesn't affect elevators and vehicles
// adding these logical exclusion situations to maintain this where I think it was intended to be.
if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero))
if (m_throttleUpdates || PIDActive || (m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE) || (Amotor != IntPtr.Zero))
{
m_minvelocity = 0.5f;
}
@@ -2973,8 +2973,8 @@ Console.WriteLine(" JointCreateFixed");
{
}
public override Vector3 PIDTarget
{
public override Vector3 PIDTarget
{
set
{
if (value.IsFinite())
@@ -2983,7 +2983,7 @@ Console.WriteLine(" JointCreateFixed");
}
else
m_log.WarnFormat("[PHYSICS]: Got NaN PIDTarget from Scene on Object {0}", Name);
}
}
}
public override bool PIDActive { get; set; }
@@ -2993,7 +2993,7 @@ Console.WriteLine(" JointCreateFixed");
public override bool PIDHoverActive { get { return m_useHoverPID;} set { m_useHoverPID = value; } }
public override PIDHoverType PIDHoverType { set { m_PIDHoverType = value; } }
public override float PIDHoverTau { set { m_PIDHoverTau = value; } }
public override Quaternion APIDTarget{ set { return; } }
public override bool APIDActive{ set { return; } }
@@ -3189,7 +3189,7 @@ Console.WriteLine(" JointCreateFixed");
// m_assetFailed = false;
// m_log.DebugFormat(
// "[ODE PRIM]: Received mesh/sculpt data asset {0} with {1} bytes for {2} at {3} in {4}",
// "[ODE PRIM]: Received mesh/sculpt data asset {0} with {1} bytes for {2} at {3} in {4}",
// _pbs.SculptTexture, _pbs.SculptData.Length, Name, _position, _parent_scene.Name);
m_taintshape = true;
@@ -3201,6 +3201,6 @@ Console.WriteLine(" JointCreateFixed");
"[ODE PRIM]: Could not get mesh/sculpt asset {0} for {1} at {2} in {3}",
_pbs.SculptTexture, Name, _position, _parent_scene.PhysicsSceneName);
}
}
}
}
}

View File

@@ -75,7 +75,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
{
m_scene = pScene;
nearCallback = near;
}
/// <summary>
@@ -136,7 +136,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
ODERayCastRequest[] reqs = m_PendingRequests.ToArray();
for (int i = 0; i < reqs.Length; i++)
{
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
RayCast(reqs[i]); // if there isn't anyone to send results
}
@@ -151,7 +151,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
ODERayRequest[] reqs = m_PendingRayRequests.ToArray();
for (int i = 0; i < reqs.Length; i++)
{
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
RayCast(reqs[i]); // if there isn't anyone to send results
}
@@ -247,7 +247,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
req.callbackMethod(m_contactResults);
}
}
// This is the standard Near. Uses space AABBs to speed up detection.
private void near(IntPtr space, IntPtr g1, IntPtr g2)
{
@@ -262,7 +262,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
{
if (g1 == IntPtr.Zero || g2 == IntPtr.Zero)
return;
// Separating static prim geometry spaces.
// We'll be calling near recursivly if one
// of them is a space to find all of the
@@ -290,7 +290,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
int count = 0;
try
{
if (g1 == g2)
return; // Can't collide with yourself
@@ -326,7 +326,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
if (p1 is OdePrim)
{
ContactResult collisionresult = new ContactResult();
collisionresult.ConsumerID = p1.LocalID;
collisionresult.Pos = new Vector3(contacts[i].pos.X, contacts[i].pos.Y, contacts[i].pos.Z);
collisionresult.Depth = contacts[i].depth;

View File

@@ -126,7 +126,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
/// </remarks>
internal static Object UniversalColliderSyncObject = new Object();
internal static Object SimulationLock = new Object();
/// <summary>
/// Is stats collecting enabled for this ODE scene?
/// </summary>
@@ -495,14 +495,14 @@ namespace OpenSim.Region.PhysicsModule.ODE
int spaceGridMaxY;
private ODERayCastRequestManager m_rayCastManager;
public Scene m_frameWorkScene = null;
public Scene m_frameWorkScene = null;
public OdeScene(Scene pscene, IConfigSource psourceconfig, string pname, string pversion)
{
m_config = psourceconfig;
m_frameWorkScene = pscene;
{
m_config = psourceconfig;
m_frameWorkScene = pscene;
EngineType = pname;
PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName;
EngineName = pname + " " + pversion;
@@ -513,8 +513,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
InitialiseFromConfig(m_config);
// This may not be that good since terrain may not be avaiable at this point
base.Initialise(pscene.PhysicsRequestAsset,
(pscene.Heightmap != null ? pscene.Heightmap.GetFloatsSerialised() : new float[(int)(extent.X * extent.Y)]),
base.Initialise(pscene.PhysicsRequestAsset,
(pscene.Heightmap != null ? pscene.Heightmap.GetFloatsSerialised() : new float[(int)(extent.X * extent.Y)]),
(float)pscene.RegionInfo.RegionSettings.WaterHeight);
}
@@ -524,8 +524,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
mesher = m_frameWorkScene.RequestModuleInterface<IMesher>();
if (mesher == null)
m_log.WarnFormat("[ODE SCENE]: No mesher in {0}. Things will not work well.", PhysicsSceneName);
m_frameWorkScene.PhysicsEnabled = true;
m_frameWorkScene.PhysicsEnabled = true;
}
/// <summary>
@@ -535,11 +535,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
/// </summary>
private void Initialise(Vector3 regionExtent)
{
WorldExtents.X = regionExtent.X;
WorldExtents.X = regionExtent.X;
m_regionWidth = (uint)regionExtent.X;
WorldExtents.Y = regionExtent.Y;
m_regionHeight = (uint)regionExtent.Y;
nearCallback = near;
m_rayCastManager = new ODERayCastRequestManager(this);
@@ -671,7 +671,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
spacesPerMeterY = spaceGridMaxY / WorldExtents.Y;
}
staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY];
staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY];
// make this index limits
spaceGridMaxX--;
@@ -948,7 +948,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
{
if (g1 == IntPtr.Zero || g2 == IntPtr.Zero)
return;
// Separating static prim geometry spaces.
// We'll be calling near recursivly if one
// of them is a space to find all of the
@@ -1027,10 +1027,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
PhysicsActor p1;
PhysicsActor p2;
p1ExpectedPoints = 0;
p2ExpectedPoints = 0;
if (!actor_name_map.TryGetValue(g1, out p1))
{
p1 = PANull;
@@ -1067,7 +1067,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
IntPtr joint;
// If we're colliding with terrain, use 'TerrainContact' instead of contact.
// allows us to have different settings
// We only need to test p2 for 'jump crouch purposes'
if (p2 is OdeCharacter && p1.PhysicsActorType == (int)ActorTypes.Prim)
{
@@ -1081,7 +1081,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
{
p2.IsColliding = true;
}
//if ((framecount % m_returncollisions) == 0)
switch (p1.PhysicsActorType)
@@ -1160,7 +1160,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
// Logic for collision handling
// Note, that if *all* contacts are skipped (VolumeDetect)
// The prim still detects (and forwards) collision events but
// The prim still detects (and forwards) collision events but
// appears to be phantom for the world
Boolean skipThisContact = false;
@@ -1235,10 +1235,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
material = ((OdePrim) p2).m_material;
p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts;
}
// Unnessesary because p1 is defined above
//if (p1 is OdePrim)
// {
// {
// p1ExpectedPoints = ((OdePrim)p1).ExpectedCollisionContacts;
// }
//m_log.DebugFormat("Material: {0}", material);
@@ -1350,7 +1350,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
material = ((OdePrim)p2).m_material;
p2ExpectedPoints = ((OdePrim)p2).ExpectedCollisionContacts;
}
//m_log.DebugFormat("Material: {0}", material);
m_materialContacts[material, 0].geom = curContact;
@@ -1370,7 +1370,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
}
collision_accounting_events(p1, p2, maxDepthContact);
if (count > ((p1ExpectedPoints + p2ExpectedPoints) * 0.25) + (geomContactPointsStartthrottle))
{
// If there are more then 3 contact points, it's likely
@@ -1410,7 +1410,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
break;
}
}
}
}
else if (at == ActorTypes.Prim)
{
if (((Math.Abs(contactGeom.normal.X - contact.normal.X) < 1.026f) && (Math.Abs(contactGeom.normal.Y - contact.normal.Y) < 0.303f) && (Math.Abs(contactGeom.normal.Z - contact.normal.Z) < 0.065f)))
@@ -1544,11 +1544,11 @@ namespace OpenSim.Region.PhysicsModule.ODE
// since we don't know if we're colliding yet
if (chr.Shell == IntPtr.Zero || chr.Body == IntPtr.Zero)
continue;
chr.IsColliding = false;
chr.CollidingGround = false;
chr.CollidingObj = false;
// Test the avatar's geometry for collision with the space
// This will return near and the space that they are the closest to
// And we'll run this again against the avatar and the space segment
@@ -1562,7 +1562,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
{
m_log.ErrorFormat("[ODE SCENE]: Unable to space collide {0}", PhysicsSceneName);
}
//float terrainheight = GetTerrainHeightAtXY(chr.Position.X, chr.Position.Y);
//if (chr.Position.Z + (chr.Velocity.Z * timeStep) < terrainheight + 10)
//{
@@ -1655,7 +1655,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
//m_log.DebugFormat("x{0} y{1} = {2}", x, y, (float)TerrainHeightFieldHeights[heightFieldGeom][index]);
return (float)TerrainHeightFieldHeights[heightFieldGeom][index];
}
else
return 0f;
}
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
{
return 0f;
}
}
}
// End recovered. Kitto Flora
/// <summary>
@@ -1685,7 +1685,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
internal void AddCollisionEventReporting(PhysicsActor obj)
{
// m_log.DebugFormat("[PHYSICS]: Adding {0} {1} to collision event reporting", obj.SOPName, obj.LocalID);
lock (m_collisionEventActorsChanges)
m_collisionEventActorsChanges[obj.LocalID] = obj;
}
@@ -2071,7 +2071,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
lock (externalJointRequestsLock)
{
if (!requestedJointsToBeCreated.Contains(joint)) // forbid same creation request from entering twice
if (!requestedJointsToBeCreated.Contains(joint)) // forbid same creation request from entering twice
{
requestedJointsToBeCreated.Add(joint);
}
@@ -2417,7 +2417,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
// waitForSpaceUnlock(space);
d.SpaceSetSublevel(space, 1);
d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]);
return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY];
}
@@ -2514,7 +2514,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
iPropertiesNotSupportedDefault++;
if ((pbs.PathTwistBegin != 0) || (pbs.PathTwist != 0))
iPropertiesNotSupportedDefault++;
iPropertiesNotSupportedDefault++;
if ((pbs.ProfileBegin != 0) || pbs.ProfileEnd != 0)
iPropertiesNotSupportedDefault++;
@@ -2587,7 +2587,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
#if SPAM
m_log.Debug("Mesh");
#endif
return true;
return true;
}
/// <summary>
@@ -2652,7 +2652,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
}
_taintedPrims.Clear();
}
int time = Util.EnvironmentTickCountSubtract(tstart);
m_log.InfoFormat("[Ode] finished {0} operations in {1}ms", donechanges, time);
}
@@ -2716,7 +2716,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
}
lock (OdeLock)
{
d.AllocateODEDataForThread(~0U);
@@ -3109,7 +3109,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
// as the axis for the hinge.
// Therefore, we must get the joint's coordinate frame based on the
// joint.Rotation field, which originates from the orientation of the
// joint.Rotation field, which originates from the orientation of the
// joint's proxy object in the scene.
// The joint's coordinate frame is defined as the transformation matrix
@@ -3237,7 +3237,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
int startTime = Util.EnvironmentTickCount();
m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", PhysicsSceneName, pOffset);
float[] _heightmap;
// ok im lasy this are just a aliases