diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index f3879f0bc1..cd5046a191 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1564,6 +1564,8 @@ namespace OpenSim.Region.Framework.Scenes /// public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive, bool m_physicalPrim) { +// m_log.DebugFormat("[SCENE OBJECT PART]: Applying physics to {0} {1} {2}", Name, LocalId, UUID); + bool isPhysical = (((rootObjectFlags & (uint) PrimFlags.Physics) != 0) && m_physicalPrim); bool isPhantom = ((rootObjectFlags & (uint) PrimFlags.Phantom) != 0); @@ -1584,6 +1586,8 @@ namespace OpenSim.Region.Framework.Scenes // or flexible if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) { +// m_log.DebugFormat("[SCENE OBJECT PART]: Creating PhysActor for {0} {1} {2}", Name, LocalId, UUID); + PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( LocalId, string.Format("{0}/{1}", Name, UUID), diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 54c50f8eda..13ea084978 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -86,7 +86,10 @@ namespace OpenSim.Region.Physics.Manager Vector3 size, Quaternion rotation, bool isPhysical) { PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical); - if (ret != null) ret.LocalID = localID; + + if (ret != null) + ret.LocalID = localID; + return ret; } diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index a5fe45b216..be4ee41054 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -643,6 +643,8 @@ namespace OpenSim.Region.Physics.Meshing public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) { +// m_log.DebugFormat("[MESH]: Creating mesh for {0}", primName); + Mesh mesh = null; ulong key = 0; diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index c91658e946..1060278ded 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -791,6 +791,8 @@ namespace OpenSim.Region.Physics.OdePlugin public void setMesh(OdeScene parent_scene, IMesh mesh) { +// m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh); + // This sleeper is there to moderate how long it takes between // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object @@ -1398,7 +1400,6 @@ namespace OpenSim.Region.Physics.OdePlugin } } } - else { _parent_scene.waitForSpaceUnlock(m_targetSpace); @@ -1960,7 +1961,7 @@ 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); @@ -1968,7 +1969,7 @@ Console.WriteLine(" JointCreateFixed"); else { _mesh = null; -//Console.WriteLine("changesize 2"); +Console.WriteLine("changesize 2"); CreateGeom(m_targetSpace, _mesh); } @@ -2070,12 +2071,13 @@ Console.WriteLine(" JointCreateFixed"); IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); // createmesh returns null when it doesn't mesh. +Console.WriteLine("changeshape needed meshing"); CreateGeom(m_targetSpace, mesh); } else { _mesh = null; -//Console.WriteLine("changeshape"); +Console.WriteLine("changeshape not need meshing"); CreateGeom(m_targetSpace, null); } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 8d9f5f14d6..ae9c3775bd 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1770,6 +1770,8 @@ 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); + PhysicsActor result; IMesh mesh = null;