Fix wrong active angularlock detection (it was only burning cpu), stop trying to add a amotor to each child prim and stop using unnecessary trimeshcallbacks
parent
8dcb4de53c
commit
24435cfe9a
|
@ -445,7 +445,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
||||||
m_disabled = false;
|
m_disabled = false;
|
||||||
|
|
||||||
// The body doesn't already have a finite rotation mode set here
|
// The body doesn't already have a finite rotation mode set here
|
||||||
if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0.0f)) && _parent == null)
|
if ((!m_angularlock.ApproxEquals(Vector3.One, 0.0f)) && _parent == null)
|
||||||
{
|
{
|
||||||
createAMotor(m_angularlock);
|
createAMotor(m_angularlock);
|
||||||
}
|
}
|
||||||
|
@ -919,7 +919,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
||||||
// _parent_scene.waitForSpaceUnlock(m_targetSpace);
|
// _parent_scene.waitForSpaceUnlock(m_targetSpace);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null));
|
SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, null, null, null));
|
||||||
}
|
}
|
||||||
catch (AccessViolationException)
|
catch (AccessViolationException)
|
||||||
{
|
{
|
||||||
|
@ -1121,7 +1121,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
|
||||||
{
|
{
|
||||||
d.Mass m2;
|
d.Mass m2;
|
||||||
d.MassSetZero(out m2);
|
d.MassSetZero(out m2);
|
||||||
d.MassSetBoxTotal(out m2, prim.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z);
|
d.MassSetBoxTotal(out m2, prm.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z);
|
||||||
|
|
||||||
d.Quaternion quat = new d.Quaternion();
|
d.Quaternion quat = new d.Quaternion();
|
||||||
quat.W = prm._orientation.W;
|
quat.W = prm._orientation.W;
|
||||||
|
@ -1184,11 +1184,6 @@ Console.WriteLine("ZProcessTaints for " + Name);
|
||||||
prm.m_collisionscore = 0;
|
prm.m_collisionscore = 0;
|
||||||
prm.m_disabled = false;
|
prm.m_disabled = false;
|
||||||
|
|
||||||
// The body doesn't already have a finite rotation mode set here
|
|
||||||
if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null)
|
|
||||||
{
|
|
||||||
prm.createAMotor(m_angularlock);
|
|
||||||
}
|
|
||||||
prm.Body = Body;
|
prm.Body = Body;
|
||||||
_parent_scene.ActivatePrim(prm);
|
_parent_scene.ActivatePrim(prm);
|
||||||
}
|
}
|
||||||
|
@ -1235,7 +1230,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
|
||||||
m_disabled = false;
|
m_disabled = false;
|
||||||
|
|
||||||
// The body doesn't already have a finite rotation mode set here
|
// The body doesn't already have a finite rotation mode set here
|
||||||
if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null)
|
if ((!m_angularlock.ApproxEquals(Vector3.One, 0f)) && _parent == null)
|
||||||
{
|
{
|
||||||
createAMotor(m_angularlock);
|
createAMotor(m_angularlock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -580,8 +580,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
||||||
m_suportCombine = false;
|
m_suportCombine = false;
|
||||||
|
|
||||||
nearCallback = near;
|
nearCallback = near;
|
||||||
triCallback = TriCallback;
|
// triCallback = TriCallback;
|
||||||
triArrayCallback = TriArrayCallback;
|
// triArrayCallback = TriArrayCallback;
|
||||||
m_rayCastManager = new ODERayCastRequestManager(this);
|
m_rayCastManager = new ODERayCastRequestManager(this);
|
||||||
|
|
||||||
// Create the world and the first space
|
// Create the world and the first space
|
||||||
|
@ -1811,10 +1811,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
||||||
//}
|
//}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
private int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount)
|
private int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount)
|
||||||
{
|
{
|
||||||
/* String name1 = null;
|
String name1 = null;
|
||||||
String name2 = null;
|
String name2 = null;
|
||||||
|
|
||||||
if (!geom_name_map.TryGetValue(trimesh, out name1))
|
if (!geom_name_map.TryGetValue(trimesh, out name1))
|
||||||
|
@ -1827,7 +1827,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.InfoFormat("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2);
|
m_log.InfoFormat("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2);
|
||||||
*/
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1857,7 +1857,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is our collision testing routine in ODE
|
/// This is our collision testing routine in ODE
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1988,8 +1988,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
||||||
|
|
||||||
x = x - offsetX + 1f;
|
x = x - offsetX + 1f;
|
||||||
y = y - offsetY + 1f;
|
y = y - offsetY + 1f;
|
||||||
// map is rotated
|
|
||||||
|
|
||||||
|
// map is rotated
|
||||||
index = (int)x * ((int)m_regionHeight + 3) + (int)y;
|
index = (int)x * ((int)m_regionHeight + 3) + (int)y;
|
||||||
|
|
||||||
if (index < TerrainHeightFieldHeights[heightFieldGeom].Length)
|
if (index < TerrainHeightFieldHeights[heightFieldGeom].Length)
|
||||||
|
|
Loading…
Reference in New Issue