aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-05-30 21:32:15 +0100
committerUbitUmarov2012-05-30 21:32:15 +0100
commitcc903992dd3d74a7ff859f0e1a6363ac0c074520 (patch)
tree069745089fef03d8772cf77e38748e4801b276e5 /OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
parentGuard setting the building flag (diff)
downloadopensim-SC-cc903992dd3d74a7ff859f0e1a6363ac0c074520.zip
opensim-SC-cc903992dd3d74a7ff859f0e1a6363ac0c074520.tar.gz
opensim-SC-cc903992dd3d74a7ff859f0e1a6363ac0c074520.tar.bz2
opensim-SC-cc903992dd3d74a7ff859f0e1a6363ac0c074520.tar.xz
ubitode prim: if makebody() is called already having a body, do a full destrution so there are no 'leaks'.
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index ac049b2..9a40ab5 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -1621,12 +1621,13 @@ namespace OpenSim.Region.Physics.OdePlugin
1621 1621
1622 if (Body != IntPtr.Zero) 1622 if (Body != IntPtr.Zero)
1623 { 1623 {
1624 d.BodyDestroy(Body); 1624// d.BodyDestroy(Body);
1625 Body = IntPtr.Zero; 1625// Body = IntPtr.Zero;
1626 // do a more complet destruction
1627 DestroyBody();
1626 m_log.Warn("[PHYSICS]: MakeBody called having a body"); 1628 m_log.Warn("[PHYSICS]: MakeBody called having a body");
1627 } 1629 }
1628 1630
1629
1630 if (d.GeomGetBody(prim_geom) != IntPtr.Zero) 1631 if (d.GeomGetBody(prim_geom) != IntPtr.Zero)
1631 { 1632 {
1632 d.GeomSetBody(prim_geom, IntPtr.Zero); 1633 d.GeomSetBody(prim_geom, IntPtr.Zero);