Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor

This commit is contained in:
Kitto Flora
2010-08-04 21:08:14 +00:00
22 changed files with 519 additions and 106 deletions

View File

@@ -131,6 +131,7 @@ namespace OpenSim.Region.Physics.OdePlugin
//public GCHandle gc;
private CollisionLocker ode;
private bool m_meshfailed = false;
private bool m_taintforce = false;
private bool m_taintaddangularforce = false;
private Vector3 m_force;
@@ -1882,12 +1883,20 @@ namespace OpenSim.Region.Physics.OdePlugin
m_targetSpace = targetspace;
if (_mesh == null)
if (_mesh == null && m_meshfailed == false)
{
if (_parent_scene.needsMeshing(_pbs))
{
// Don't need to re-enable body.. it's done in SetMesh
_mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
try
{
_mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
}
catch
{
//Don't continuously try to mesh prims when meshing has failed
m_meshfailed = true;
}
// createmesh returns null when it's a shape that isn't a cube.
// m_log.Debug(m_localID);
}
@@ -2127,7 +2136,7 @@ Console.WriteLine(" JointCreateFixed");
// we don't need to do space calculation because the client sends a position update also.
// Construction of new prim
if (_parent_scene.needsMeshing(_pbs))
if (_parent_scene.needsMeshing(_pbs) && m_meshfailed == false)
{
float meshlod = _parent_scene.meshSculptLOD;
@@ -2137,8 +2146,15 @@ Console.WriteLine(" JointCreateFixed");
IMesh mesh = null;
if (_parent_scene.needsMeshing(_pbs))
mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
try
{
if (_parent_scene.needsMeshing(_pbs))
mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
}
catch
{
m_meshfailed = true;
}
//IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
//Console.WriteLine("changesize 1");
@@ -2233,17 +2249,23 @@ Console.WriteLine(" JointCreateFixed");
if (_size.Z <= 0) _size.Z = 0.01f;
// Construction of new prim
if (_parent_scene.needsMeshing(_pbs))
if (_parent_scene.needsMeshing(_pbs) && m_meshfailed == false)
{
// Don't need to re-enable body.. it's done in SetMesh
float meshlod = _parent_scene.meshSculptLOD;
if (IsPhysical)
meshlod = _parent_scene.MeshSculptphysicalLOD;
IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
try
{
IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
CreateGeom(m_targetSpace, mesh);
}
catch
{
m_meshfailed = true;
}
// createmesh returns null when it doesn't mesh.
CreateGeom(m_targetSpace, mesh);
}
else
{