diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 370c55b..1cdd567 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1641,6 +1641,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1641 | m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom.", m_uuid); | 1641 | m_log.ErrorFormat("[SCENE]: caught exception meshing object {0}. Object set to phantom.", m_uuid); |
1642 | PhysActor = null; | 1642 | PhysActor = null; |
1643 | } | 1643 | } |
1644 | |||
1644 | // Basic Physics returns null.. joy joy joy. | 1645 | // Basic Physics returns null.. joy joy joy. |
1645 | if (PhysActor != null) | 1646 | if (PhysActor != null) |
1646 | { | 1647 | { |
@@ -4454,12 +4455,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4454 | || (Shape.PathCurve == (byte)Extrusion.Flexible)) // note: this may have been changed above in the case of joints | 4455 | || (Shape.PathCurve == (byte)Extrusion.Flexible)) // note: this may have been changed above in the case of joints |
4455 | { | 4456 | { |
4456 | AddFlag(PrimFlags.Phantom); | 4457 | AddFlag(PrimFlags.Phantom); |
4458 | |||
4457 | if (PhysActor != null) | 4459 | if (PhysActor != null) |
4458 | { | 4460 | RemoveFromPhysics(); |
4459 | m_parentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); | ||
4460 | /// that's not wholesome. Had to make Scene public | ||
4461 | PhysActor = null; | ||
4462 | } | ||
4463 | } | 4461 | } |
4464 | else // Not phantom | 4462 | else // Not phantom |
4465 | { | 4463 | { |
@@ -4573,6 +4571,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
4573 | // m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); | 4571 | // m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); |
4574 | } | 4572 | } |
4575 | 4573 | ||
4574 | /// <summary> | ||
4575 | /// This removes the part from physics | ||
4576 | /// </summary> | ||
4577 | /// <remarks> | ||
4578 | /// This isn't the same as turning off physical, since even without being physical the prim has a physics | ||
4579 | /// representation for collision detection. Rather, this would be used in situations such as making a prim | ||
4580 | /// phantom. | ||
4581 | /// </remarks> | ||
4582 | public void RemoveFromPhysics() | ||
4583 | { | ||
4584 | ParentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); | ||
4585 | PhysActor = null; | ||
4586 | } | ||
4587 | |||
4576 | public void UpdateRotation(Quaternion rot) | 4588 | public void UpdateRotation(Quaternion rot) |
4577 | { | 4589 | { |
4578 | if ((rot.X != RotationOffset.X) || | 4590 | if ((rot.X != RotationOffset.X) || |