aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 5fddaed..2852c4b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1604,7 +1604,10 @@ namespace OpenSim.Region.Framework.Scenes
1604 } 1604 }
1605 } 1605 }
1606 else if (PhysActor == null) 1606 else if (PhysActor == null)
1607 {
1607 ApplyPhysics((uint)Flags, VolumeDetectActive, false); 1608 ApplyPhysics((uint)Flags, VolumeDetectActive, false);
1609 UpdatePhysicsSubscribedEvents();
1610 }
1608 else 1611 else
1609 { 1612 {
1610 PhysActor.PhysicsShapeType = m_physicsShapeType; 1613 PhysActor.PhysicsShapeType = m_physicsShapeType;
@@ -4664,7 +4667,15 @@ namespace OpenSim.Region.Framework.Scenes
4664 /// </remarks> 4667 /// </remarks>
4665 public void RemoveFromPhysics() 4668 public void RemoveFromPhysics()
4666 { 4669 {
4667 ParentGroup.Scene.PhysicsScene.RemovePrim(PhysActor); 4670 PhysicsActor pa = PhysActor;
4671 if (pa != null)
4672 {
4673 pa.OnCollisionUpdate -= PhysicsCollision;
4674 pa.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate;
4675 pa.OnOutOfBounds -= PhysicsOutOfBounds;
4676
4677 ParentGroup.Scene.PhysicsScene.RemovePrim(pa);
4678 }
4668 PhysActor = null; 4679 PhysActor = null;
4669 } 4680 }
4670 4681