From be6edefcfb6574c1d011809315bfc464c479844c Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 15 Feb 2008 21:35:52 +0000 Subject: * ODE Stability update 4 :D * Changed the way meshing requests get sent to the ODEPlugin * Numerous other fixes --- OpenSim/Region/Environment/Scenes/Scene.cs | 17 ++++++++- .../Region/Environment/Scenes/SceneObjectGroup.cs | 41 ++++++++++------------ .../Region/Environment/Scenes/SceneObjectPart.cs | 5 +++ 3 files changed, 40 insertions(+), 23 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 708da15..d8cb11c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -737,12 +737,27 @@ namespace OpenSim.Region.Environment.Scenes m_statsReporter.addOtherMS(otherMS); m_statsReporter.SetActiveScripts(m_innerScene.GetActiveScripts()); m_statsReporter.addScriptLines(m_innerScene.GetScriptLPS()); - + } catch (NotImplementedException) { throw; } + catch (System.AccessViolationException e) + { + m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); + + } + catch (System.NullReferenceException e) + { + m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); + + } + catch (System.InvalidOperationException e) + { + m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); + + } catch (Exception e) { m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index e8d4766..519858b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1265,23 +1265,11 @@ namespace OpenSim.Region.Environment.Scenes if (part != null) { part.UpdateShape(shapeBlock); - } - if (m_rootPart.PhysActor != null) - { - m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor); - m_rootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape( - m_rootPart.Name, - m_rootPart.Shape, - new PhysicsVector(m_rootPart.AbsolutePosition.X, m_rootPart.AbsolutePosition.Y, - m_rootPart.AbsolutePosition.Z), - new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z), - new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, - m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z), - m_rootPart.PhysActor.IsPhysical); - bool UsePhysics = ((m_rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); - m_rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); + if (part.PhysActor != null) + m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); } + } #endregion @@ -1299,15 +1287,24 @@ namespace OpenSim.Region.Environment.Scenes if (part != null) { part.Resize(scale); - if (part.UUID == m_rootPart.UUID) + if (part.PhysActor != null) { - if (m_rootPart.PhysActor != null) - { - m_rootPart.PhysActor.Size = - new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z); - m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); - } + part.PhysActor.Size = + new PhysicsVector(scale.X, scale.Y, scale.Z); + m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); } + if (part.UUID != m_rootPart.UUID) + ScheduleGroupForFullUpdate(); + + //if (part.UUID == m_rootPart.UUID) + //{ + //if (m_rootPart.PhysActor != null) + //{ + //m_rootPart.PhysActor.Size = + //new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z); + //m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); + //} + //} } } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 1d5dd5b..5756a0b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1182,6 +1182,10 @@ namespace OpenSim.Region.Environment.Scenes m_shape.PathTaperY = shapeBlock.PathTaperY; m_shape.PathTwist = shapeBlock.PathTwist; m_shape.PathTwistBegin = shapeBlock.PathTwistBegin; + if (PhysActor != null) + { + PhysActor.Shape = m_shape; + } ScheduleFullUpdate(); } @@ -1583,6 +1587,7 @@ namespace OpenSim.Region.Environment.Scenes public void Resize(LLVector3 scale) { m_shape.Scale = scale; + ScheduleFullUpdate(); } -- cgit v1.1