diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 6b29ec1..a005068 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -549,6 +549,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
549 | // that are part of the Scene Object being removed | 549 | // that are part of the Scene Object being removed |
550 | m_numTotalPrim -= grp.PrimCount; | 550 | m_numTotalPrim -= grp.PrimCount; |
551 | 551 | ||
552 | bool isPh = (grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics; | ||
553 | int nphysparts = 0; | ||
552 | // Go through all parts (primitives and meshes) of this Scene Object | 554 | // Go through all parts (primitives and meshes) of this Scene Object |
553 | foreach (SceneObjectPart part in grp.Parts) | 555 | foreach (SceneObjectPart part in grp.Parts) |
554 | { | 556 | { |
@@ -559,10 +561,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
559 | m_numMesh--; | 561 | m_numMesh--; |
560 | else | 562 | else |
561 | m_numPrim--; | 563 | m_numPrim--; |
564 | |||
565 | if(isPh && part.PhysicsShapeType != (byte)PhysShapeType.none) | ||
566 | nphysparts++; | ||
562 | } | 567 | } |
563 | 568 | ||
564 | if ((grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics) | 569 | if (nphysparts > 0 ) |
565 | RemovePhysicalPrim(grp.PrimCount); | 570 | RemovePhysicalPrim(nphysparts); |
566 | } | 571 | } |
567 | 572 | ||
568 | bool ret = Entities.Remove(uuid); | 573 | bool ret = Entities.Remove(uuid); |