aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs25
1 files changed, 14 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index eb90cf4..726f2e9 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -617,20 +617,23 @@ namespace OpenSim.Region.Physics.OdePlugin
617 public void disableBody() 617 public void disableBody()
618 { 618 {
619 //this kills the body so things like 'mesh' can re-create it. 619 //this kills the body so things like 'mesh' can re-create it.
620 if (Body != (IntPtr) 0) 620 lock (this)
621 { 621 {
622 m_collisionCategories &= ~CollisionCategories.Body; 622 if (Body != (IntPtr)0)
623 m_collisionFlags &= ~(CollisionCategories.Wind | CollisionCategories.Land);
624
625 if (prim_geom != (IntPtr)0)
626 { 623 {
627 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); 624 m_collisionCategories &= ~CollisionCategories.Body;
628 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); 625 m_collisionFlags &= ~(CollisionCategories.Wind | CollisionCategories.Land);
629 }
630 626
631 _parent_scene.remActivePrim(this); 627 if (prim_geom != (IntPtr)0)
632 d.BodyDestroy(Body); 628 {
633 Body = (IntPtr) 0; 629 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
630 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
631 }
632
633 _parent_scene.remActivePrim(this);
634 d.BodyDestroy(Body);
635 Body = (IntPtr)0;
636 }
634 } 637 }
635 m_disabled = true; 638 m_disabled = true;
636 m_collisionscore = 0; 639 m_collisionscore = 0;