From a725b5e01ed92b54d0bddd321acbe4498492f67c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 27 Feb 2012 20:08:43 +0000 Subject: [PATCH] Let inworld meshs colide as such and not as basic prim all the time. Removed also LOD, and outerskin on colision meshs. --- OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 6 +++--- OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs index 86ab58d97e..915b88d762 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs @@ -2421,7 +2421,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Don't need to re-enable body.. it's done in SetMesh try { - _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical); + _mesh = _parent_scene.mesher.CreateMesh(m_primName, _pbs, _size, (int)LevelOfDetail.High, true); } catch { @@ -2676,7 +2676,7 @@ namespace OpenSim.Region.Physics.OdePlugin try { if (_parent_scene.needsMeshing(_pbs)) - mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); + mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, (int)LevelOfDetail.High, true); } catch { @@ -2783,7 +2783,7 @@ namespace OpenSim.Region.Physics.OdePlugin meshlod = _parent_scene.MeshSculptphysicalLOD; try { - IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); + IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, (int)LevelOfDetail.High, true); CreateGeom(m_targetSpace, mesh); } catch diff --git a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs index f84918c7e5..a57ebe9af9 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs @@ -1772,7 +1772,7 @@ namespace OpenSim.Region.Physics.OdePlugin IMesh mesh = null; if (needsMeshing(pbs)) - mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); + mesh = mesher.CreateMesh(primName, pbs, size, (int)LevelOfDetail.High, true); result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical, localid); @@ -2514,7 +2514,7 @@ namespace OpenSim.Region.Physics.OdePlugin } // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim - if (!forceSimplePrimMeshing) + if (!forceSimplePrimMeshing && !pbs.SculptEntry) { if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1 @@ -2537,6 +2537,9 @@ namespace OpenSim.Region.Physics.OdePlugin } } + if (forceSimplePrimMeshing) + return true; + if (pbs.ProfileHollow != 0) iPropertiesNotSupportedDefault++; @@ -2601,6 +2604,8 @@ namespace OpenSim.Region.Physics.OdePlugin } } + if (pbs.SculptEntry && meshSculptedPrim) + iPropertiesNotSupportedDefault++; if (iPropertiesNotSupportedDefault == 0) {